CREATE procedure [C6StagingPeriodico].[REPTRIM_W6APUT]  
AS 
BEGIN  
exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica W6APUT'
TRUNCATE TABLE [C6StagingPeriodico].[W6APUT]
INSERT INTO [C6StagingPeriodico].[W6APUT]
           ([RETE]
           ,[DTTRIM]
           ,[CODFIS]
           ,[CODMAN]
           ,[CODCONF]
           ,[DTOPE]
           ,[DESPROD]
           ,[PROGMOV]
           ,[CODCAU]
           ,[CODSCAU]
           ,[DESCAU]
           ,[IMPORTO]
           ,[FIRMA])
SELECT [RETE]
      ,[DTTRIM]
      ,[CODFIS]
      ,[CODMAN]
      ,[CODCONF]
      ,[DTOPE]
      ,[DESPROD]
      ,[PROGMOV]
      ,[CODCAU]
      ,[CODSCAU]
      ,[DESCAU]
      ,[IMPORTO]
      ,[FIRMA]
  FROM FSEI0.FSEI0.[fsei0_pdc].[w6aput]
  exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica W6APUT'
END