32 lines
735 B
Transact-SQL
32 lines
735 B
Transact-SQL
CREATE PROCEDURE [C6MartPeriodico].[GESTIONE_UPDATE_ZIP]
|
|
@Id int
|
|
AS
|
|
BEGIN
|
|
Begin try
|
|
UPDATE [C6MartPeriodico].GESTIONE_ZIP_FTP
|
|
SET
|
|
DataInvio = GetDate(),
|
|
FlagInvio = 'S'
|
|
WHERE
|
|
Id = @Id;
|
|
update t
|
|
SET
|
|
t.STATO_REPORT = 6,
|
|
t.PACCHETTO_ZIP = @Id,
|
|
t.DATA_TRANSIZIONE=GETDATE()
|
|
from C6MartPeriodico.CONTROLLO_TRIMESTRALE t
|
|
inner join C6MARTPERIODICO.GESTIONE_PDF_FTP g
|
|
on t.rete=g.rete and t.cod_fiscale = g.codicefiscale
|
|
and ID_FK_ZIP = @Id
|
|
where STATO_REPORT = 4
|
|
update t
|
|
SET
|
|
t.[Pacchetto_Zip] = @Id,
|
|
t.DATA_TRANSIZIONE=GETDATE()
|
|
from [C6MartPeriodico].[WHITELIST_ZIP] t
|
|
inner join C6MARTPERIODICO.GESTIONE_PDF_FTP g
|
|
on t.rete=g.rete and t.cod_fiscale = g.codicefiscale
|
|
end try
|
|
begin catch
|
|
end catch
|
|
END |