select

    m.codigo, m.descricao, l.descricao as LINHA, m.modelo_pai, m.grade_codigo,
    
    f.T16 as T28,
    f.T01 as T30,
    f.T02 as T32,
    f.T03 as T34,
    f.T04 as T36,
    f.T05 as T38,
    f.T06 as T40,
    f.T15 as T41,
    f.T07 as T42,
    f.T08 as T44,
    f.T09 as T45,
    f.T10 as T46,
    f.T11 as T48,
    f.T12 as T50,
    f.T13 as T52,
    f.T14 as T54,
    f.T17 as T56,
    f.T18 as T58

from TBMODELO_FICHA_TECNICA f, tbmodelo m, sp_gerar_linhas(2) a, tbmodelo_linha l
where f.modelo_codigo = m.codigo
and m.status = '1'
and f.tipo_codigo = :TIPO
and m.familia_codigo = :FAMILIA
and l.codigo = m.linha_codigo

order by m.descricao