PDC_REPORT_CreazioneDB/sql/Collaudo bfdskrepsei02c/procedure/dbo_sp_archiveDocumentIntoDB_ByIdDocument.sql
2025-06-26 18:47:11 +02:00

16 lines
502 B
Transact-SQL

--[dbo].[sp_archiveDocumentIntoDB_ByIdDocument] 7876
CREATE PROCEDURE [dbo].[sp_archiveDocumentIntoDB_ByIdDocument]
@idDocument as int
AS
BEGIN
SET NOCOUNT ON;
UPDATE [dbo].[ReportperClienteDati]
SET FlgArchiviato = 1
WHERE Identificativo = @idDocument
--V Aggiorno la tabella Generazione Report
UPDATE [dbo].[GenerazioneReport]
SET stampaDefinitiva = 'S'
where IdReport = @idDocument
update repositoryMetadati
set flagLock = 1 where idInRepository = @idDocument and repository = 0
END