CREATE procedure [C6StagingPeriodico].[REPTRIM_WSEIRPF]  
AS 
BEGIN  
exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEIRPF'
TRUNCATE TABLE [C6StagingPeriodico].[WSEIRPF]
INSERT INTO [C6StagingPeriodico].[WSEIRPF]
           ( [dttrim]
      ,[rete]
      ,[codfis]
      ,[codman]
      ,[flgprof]
      ,[flgec]
      ,[data_ora_refresh]
      ,[data_ora_inse]
      ,[data_ora_aggi])
SELECT  [dttrim]
      ,[rete]
      ,[codfis]
      ,[codman]
      ,[flgprof]
      ,[flgec]
      ,[data_ora_refresh]
      ,[data_ora_inse]
      ,[data_ora_aggi]
  FROM FSEI0.FSEI0.[fsei0_pdc].[wseirpf]
  exec [C6StagingPeriodico].[RP_W6LogBatch] 'Replica WSEIRPF'
END