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

23 lines
572 B
Transact-SQL

CREATE PROCEDURE [dbo].[sp_insertReportPerClienteDati]
@idReport as int,
@idCliente as int,
@utente as varchar(70) = null
AS
declare @rc as int
BEGIN
SET NOCOUNT ON;
INSERT INTO [dbo].[ReportperClienteDati]
([DtCreazione]
,[FlgArchiviato]
,[IdReport]
,[IdCliente]
,[Utente])
VALUES
(getdate()
,0
,@idReport
,@idCliente
,@utente)
--SELECT TOP 1 Identificativo from [ReportperClienteDati] order by DtCreazione desc
SELECT @@identity as Identificativo
END