CREATE procedure [C6StagingPeriodico].[REPTRIM_WSEICAP]  
AS 
BEGIN  
exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEICAP'
TRUNCATE TABLE [C6StagingPeriodico].[WSEICAP]
INSERT INTO [C6StagingPeriodico].[WSEICAP]
           ([DTTRIM]
           ,[DTRIFE]
           ,[RETE]
           ,[CODFIS]
           ,[CODMAN]
           ,[CODCONF]
           ,[SUBPROD]
           ,[ISIN]
           ,[DTINIZ]
           ,[DTFINE]
           ,[CTV_COMMIT]
           ,[IMPVERS]
           ,[IMPRES]
           ,[DESCPROD]
           ,[SGR])
SELECT [DTTRIM]
      ,[DTRIFE]
      ,[RETE]
      ,[CODFIS]
      ,[CODMAN]
      ,[CODCONF]
      ,[SUBPROD]
      ,[ISIN]
      ,[DTINIZ]
      ,[DTFINE]
      ,[CTV_COMMIT]
      ,[IMPVERS]
      ,[IMPRES]
      ,[DESCPROD]
      ,[SGR]
  FROM FSEI0.FSEI0.[fsei0_pdc].[wseicap]
  exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEICAP'
END