CREATE procedure [C6StagingPeriodico].[REPTRIM_WSEIFP]  
AS 
BEGIN  
exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEIFP'
TRUNCATE TABLE [C6StagingPeriodico].[WSEIFP]
INSERT INTO [C6StagingPeriodico].[WSEIFP]
           ([DTTRIM]
           ,[DTRIFE]
           ,[RETE]
           ,[CODFIS]
           ,[CODMAN]
           ,[CODCONF]
           ,[CODPROD]
           ,[SUBPROD]
           ,[ISIN]
           ,[CTV]
           ,[PREZZO]
           ,[QUOTE]
           ,[PREZZOMAX]
           ,[DTPREZZOMAX]
           ,[PREZZOPROT]
           ,[CTRVIMPPROT])
SELECT [DTTRIM]
      ,[DTRIFE]
      ,[RETE]
      ,[CODFIS]
      ,[CODMAN]
      ,[CODCONF]
      ,[CODPROD]
      ,[SUBPROD]
      ,[ISIN]
      ,[CTV]
      ,[PREZZO]
      ,[QUOTE]
      ,[PREZZOMAX]
      ,[DTPREZZOMAX]
      ,[PREZZOPROT]
      ,[CTRVIMPPROT]
  FROM FSEI0.sfsei0.[fsei0_pdc].[wseifp]
  exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEIFP'
END