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

17 lines
460 B
Transact-SQL

--sp_insertIdReportPerCliente 11,752
CREATE PROCEDURE [dbo].[sp_insertIdReportPerCliente]
@IdModello as int,
@idCliente as int
AS
BEGIN
SET NOCOUNT ON;
if(not exists(select IdCliente from [dbo].[ReportPerCliente] where IdCliente = @idCliente and IdReport = @IdModello))
INSERT INTO [dbo].[ReportPerCliente]
([DtAssociazione]
,[IdReport]
,[IdCliente])
VALUES
(getdate()
,@IdModello
,@idCliente)
END