string(498) " FROM tabarquivos A LEFT JOIN TabVereador V ON (A.NGestor = V.IdVereador) LEFT JOIN tabcompetencia cp on (A.NComp = cp.IdComp) LEFT JOIN tabogrupopublica G ON(A.NGrupo = G.IdGrupoPublica), tabtipoarq T, tabcatarq C WHERE (A.NTipoArq = T.IdTipoArq) AND (T.NTipoCat = C.Id) AND T.NTipoCat = 3 AND (VSite = 'S' or (VSite IS NULL)) AND A.DtDelete IS NULL AND A.NTipoArq = :cat "