PDC_REPORT_CreazioneDB/sql/Testbes/procedure/C6MartPeriodico_UpdateStatoReport.sql
2025-06-10 15:29:40 +02:00

9 lines
426 B
SQL

CREATE procedure [C6MartPeriodico].[UpdateStatoReport](@FiscalCode nvarchar(max), @Rete nvarchar(max))
as
begin
insert into dbo.logn(message, level, logged, application)
select 'UpdateStatoReport:'+@fiscalCode+@Rete, 'Info', getdate(), 'Trimestrale'
update C6MartPeriodico.controllo_trimestrale
set stato_report = 4
where COALESCE(cod_fiscale,'R')=COALESCE(@FiscalCode,'R') and COALESCE(rete,'R') =COALESCE(@Rete,'R')
end