CREATE procedure [C6StagingPeriodico].[REPTRIM_WSEICS]  
AS 
BEGIN  
exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEICS'
TRUNCATE TABLE [C6StagingPeriodico].[WSEICS]
INSERT INTO [C6StagingPeriodico].[wseics]
           ([DTTRIM]
           ,[DTRIFE]
           ,[RETE]
           ,[CODFIS]
           ,[CODCONF]
           ,[NUMPOL]
           ,[CONTO]
           ,[RUBR]
           ,[CUSTGAR]
           ,[TIPPROD]
           ,[CODINT]
           ,[CODPROD]
           ,[SUBPROD]
           ,[MAF]
           ,[CODABI]
           ,[PCTKEY]
           ,[DESTIT]
           ,[CTV]
           ,[PARTVIA]
           ,[PARTVIAAL]
           ,[DTSOTTOS]
           ,[RENDINIZ]
           ,[RENDANNO]
           ,[VALORE]
           ,[SUBSET]
           ,[CVN]
           ,[QUOTE]
           ,[CODMAN]
           ,[SALRISC]
           ,[ATTIVO]
		   ,[PREZZO]
		   ,[DIVISA]
		   ,[BASE_PREZZ])
SELECT [DTTRIM]
      ,[DTRIFE]
      ,[RETE]
      ,[CODFIS]
      ,[CODCONF]
      ,[NUMPOL]
      ,[CONTO]
      ,[RUBR]
      ,[CUSTGAR]
      ,[TIPPROD]
      ,[CODINT]
      ,[CODPROD]
      ,[SUBPROD]
      ,[MAF]
      ,[CODABI]
      ,[PCTKEY]
      ,[DESTIT]
      ,[CTV]
      ,[PARTVIA]
      ,[PARTVIAAL]
      ,[DTSOTTOS]
      ,[RENDINIZ]
      ,[RENDANNO]
      ,[VALORE]
      ,[SUBSET]
      ,[CVN]
      ,[QUOTE]
      ,[CODMAN]
      ,[SALRISC]
      ,[ATTIVO]
	  ,[PREZZO]
	  ,[DIVISA]
	  ,[BASE_PREZZ]
  FROM FSEI0.sfsei0.[fsei0_pdc].[wseics]
  exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEICS'
END