ENDEREÇO, Centro
Laurentino - SC - Cep: 89170-000
Fone: (47) 3546-1370
[ Ocultar Dados ]
select A.* from gedoc_tab_007 A LEFT join gedoc_tab_091 B on (B.CODIGO=A.ARQTEXTO and A.CNPJ=B.CNPJ and B.AUTOR like '%Paulo Antônio Caetano%') where A.CNPJ='79369955000170' and (GERADO is null or GERADO='') and A.DATA<>'0000-00-00' and A.DATA is not null and (A.AUTOR like '%Paulo Antônio Caetano%' or (B.AUTOR like '%Paulo Antônio Caetano%')) order by A.DATA desc, CAST(SUBSTRING(numero, 1,5) as signed integer) desc limit 0, 10