CREATE procedure [C6StagingPeriodico].[REPTRIM_WSEIUL]  
AS 
BEGIN  
exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEIUL'
TRUNCATE TABLE [C6StagingPeriodico].[WSEIUL]
INSERT INTO [C6StagingPeriodico].[wseiul]
           ([DTTRIM]
           ,[RETE]
           ,[CODFIS]
           ,[CODCONF]
           ,[CODINT]
           ,[SUBPROD]
           ,[CTV]
           ,[DTRIFE]
           ,[ISINFIT]
           ,[ISIN]
           ,[MAF]
           ,[SUBSET]
           ,[CODMAN]
           ,[PREZZOMAX]
           ,[DTPREZZOMAX]
           ,[PREZZOPROT]
           ,[CTRVIMPPROT]
           ,[PREZZO]
           ,[QUOTE]
		   ,[DIVISA]
		   ,[BASE_PREZZ])
SELECT [DTTRIM]
      ,[RETE]
      ,[CODFIS]
      ,[CODCONF]
      ,[CODINT]
      ,[SUBPROD]
      ,[CTV]
      ,[DTRIFE]
      ,[ISINFIT]
      ,[ISIN]
      ,[MAF]
      ,[SUBSET]
      ,[CODMAN]
      ,[PREZZOMAX]
      ,[DTPREZZOMAX]
      ,[PREZZOPROT]
      ,[CTRVIMPPROT]
      ,[PREZZO]
      ,[QUOTE]
	  ,[DIVISA]
	  ,[BASE_PREZZ]
  FROM FSEI0.sfsei0.[fsei0_pdc].[wseiul]
  exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEIUL'
END