PDC_REPORT_CreazioneDB/sql/storedCollaudo/C6MartPeriodico_DM_CONGELAMENTO_SEI.sql
2025-06-09 17:09:11 +02:00

23 lines
704 B
Transact-SQL

-- =============================================
-- 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