-- =============================================  
-- Author:  <Author,,Name>  
-- Create date: <Create Date,,>  
-- Description: <Description,,>  
-- =============================================  
CREATE procedure [C6MartPeriodico].[DM_CONGELAMENTO_SEI]   
AS  
BEGIN  
 -- SET NOCOUNT ON added to prevent extra result sets from  
 -- interfering with SELECT statements.  
 SET NOCOUNT ON;  
 DECLARE @ID_ELAB INT  
 SET @ID_ELAB = C6MartPeriodico.GETIDELAB()  
 TRUNCATE TABLE C6MartPeriodico.CONGELAMENTO_SEI  
 INSERT INTO C6MartPeriodico.CONGELAMENTO_SEI  
  ([DATA_CONGELAMENTO]  
  ,[ID_ELAB])  
 SELECT  
  DATA_CONGELAMENTO,  
  @ID_ELAB  
 FROM  
  C6StagingPeriodico.CONGELAMENTO_SEI  
END