CREATE procedure [dbo].[SRV_CONTROLLA_FASE1] as begin select * from log_esecuzione select * from global_error select * from c6mart.gestione_pdf_Ftp a join c6mart.contrattosei b on a.rete = b.rete and a.codiceFiscale = b.cod_fiscale and nazione <> 'italia' and dataGenerazione > getDate() - 1 select * from c6mart.gestione_pdf_Ftp a join port_errati b on a.rete = b.rete and a.codiceFiscale = b.cod_fiscale and dataGenerazione > getDate() - 1 end