2025-06-10 15:29:00 +02:00

19 lines
1.8 KiB
SQL

Create procedure dbo.AMB_InfoTRIM ( @CF varchar(20) = 'DMECST71D10H501E') as
BEGIN
Select 'X' GESTIONE_PDF_FTP , * From C6Mart.GESTIONE_PDF_FTP where CodiceFiscale = @CF
Select 'X' vInfoCliente_PROD , chiaveClientePB, codFis, pIva, rete, codiceContratto, StatoContratto, Agente, chiavePb, NomePb, CognomePb, * From consuni.consulenzaunica.dbo.vinfocliente where (CodFis = @CF or Piva= @CF)
Select 'X' gestione_email , * From C6Mart.gestione_email where Cod_Fiscale = @CF
Select 'X' GESTIONE_PDF_FTP , * From C6MartPeriodico.GESTIONE_PDF_FTP where CodiceFiscale = @CF
Select 'X' GESTIONE_PDF_FTP_HST , * From C6MartPeriodico.GESTIONE_PDF_FTP_HST where CodiceFiscale = @CF
Select 'X' ContrattiPretrimestrale , * From C6StagingPeriodico.ContrattiPretrimestrale where Cod_Fiscale = @CF
Select 'X' APPO_CONTRATTI , * From C6StagingPeriodico.APPO_CONTRATTI where Cod_Fiscale = @CF
Select 'X' CONTRATTOSEI , * From C6MartPeriodico.CONTRATTOSEI where Cod_Fiscale = @CF
Select 'X' ANAG_CLIENTI , * From C6MartPeriodico.ANAG_CLIENTI where Cod_Fiscale = @CF
Select 'X' controllo_trimestrale , * From C6MartPeriodico.controllo_trimestrale where Cod_Fiscale = @CF
--c6martperiodico.gestione_zip_ftp zip
Select 'X' CRUSCOTTO_CONTRATTISEI , * From C6MartPeriodico.CRUSCOTTO_CONTRATTISEI where CodiceFiscale = @CF
Select 'X' Popola_PiramideModello , * From C6StagingPeriodico.Popola_PiramideModello where Cod_Fiscale = @CF
Select 'X' RP_InfoCliente , * From C6STAGINGPERIODICO.RP_InfoCliente where (CodFis = @CF or piva = @CF )
Select 'X' ANAG_CLIENTI , * From C6MartPeriodico.ANAG_CLIENTI where Cod_Fiscale = @CF
Select 'X' PATRIMONIO , * From c6MartPeriodico.TB_S80_S129_EvoluzioneCTVPatrimonio_perc where Cod_Fiscale = @CF
END