CREATE procedure [C6StagingPeriodico].[REPTRIM_WSEIPR]  
AS 
BEGIN  
exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEIPR'
TRUNCATE TABLE [C6StagingPeriodico].[WSEIPR]
INSERT INTO [C6StagingPeriodico].[WSEIPR]
           ([RETE]
           ,[DTTRIM]
           ,[CODFIS]
           ,[CODMAN]
           ,[FAMPROD]
           ,[CODPROD]
           ,[SUBPROD]
           ,[CODABI]
           ,[DTRIFE]
           ,[TIPMOV]
           ,[IMPORTO])
SELECT [RETE]
      ,[DTTRIM]
      ,[CODFIS]
      ,[CODMAN]
      ,[FAMPROD]
      ,[CODPROD]
      ,[SUBPROD]
      ,[CODABI]
      ,[DTRIFE]
      ,[TIPMOV]
      ,[IMPORTO]
  FROM FSEI0.sfsei0.[fsei0_pdc].[wseipr]
  exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEIPR'
END