CREATE procedure [C6StagingPeriodico].[REPTRIM_WSEILP]  
AS 
BEGIN  
exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEILP'
TRUNCATE TABLE [C6StagingPeriodico].[WSEILP]
INSERT INTO [C6StagingPeriodico].[WSEILP]
           ([DTTRIM]
           ,[DTRIFE]
           ,[RETE]
           ,[CODFIS]
           ,[CODMAN]
           ,[CODCONF]
           ,[CODPROD]
           ,[CODLINEA]
           ,[CTV]
           ,[CTV_PROT]
           ,[CTVMON]
           ,[FLAGTRIM])
SELECT [DTTRIM]
      ,[DTRIFE]
      ,[RETE]
      ,[CODFIS]
      ,[CODMAN]
      ,[CODCONF]
      ,[CODPROD]
      ,[CODLINEA]
      ,[CTV]
      ,[CTVPROT]
      ,[CTVMON]
      ,[FLAGTRIM]
  FROM FSEI0.FSEI0.[fsei0_pdc].[wseilp]
  exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEILP'
END