86 lines
1.8 KiB
Transact-SQL
86 lines
1.8 KiB
Transact-SQL
|
|
|
|
set xact_abort on;
|
|
go
|
|
|
|
begin transaction;
|
|
go
|
|
|
|
-- disabilito triggers
|
|
DISABLE TRIGGER DatiCommessa.trg_DC_storicizza ON DatiCommessa;
|
|
DISABLE TRIGGER DatiCommForn.trg_DCF_storicizza ON DatiCommForn;
|
|
DISABLE TRIGGER DatiCommInteg.trg_DCI_storicizza ON DatiCommInteg;
|
|
DISABLE TRIGGER DatiFase.trg_DF_storicizza ON DatiFase;
|
|
GO
|
|
|
|
alter table DatiCommessa add
|
|
modificatoDa nvarchar(250);
|
|
go
|
|
|
|
alter table DatiCommForn add
|
|
modificatoDa nvarchar(250);
|
|
go
|
|
|
|
set ANSI_NULLS on;
|
|
go
|
|
|
|
alter table DatiCommInteg add
|
|
modificatoDa nvarchar(250);
|
|
go
|
|
|
|
|
|
alter table DatiFase add
|
|
modificatoDa nvarchar(250);
|
|
go
|
|
|
|
alter table Storico_DatiCommessa add
|
|
modificatoDa nvarchar(250);
|
|
go
|
|
|
|
alter table Storico_DatiCommForn add
|
|
modificatoDa nvarchar(250);
|
|
go
|
|
|
|
alter table Storico_DatiCommInteg add
|
|
modificatoDa nvarchar(250);
|
|
go
|
|
|
|
alter table Storico_DatiFase add
|
|
modificatoDa nvarchar(250);
|
|
go
|
|
|
|
-- update tab principali
|
|
UPDATE DatiCommessa SET modificatoDa = 'Maurizio Molteni'
|
|
UPDATE DatiCommForn SET modificatoDa = 'Maurizio Molteni'
|
|
UPDATE DatiCommInteg SET modificatoDa = 'Maurizio Molteni'
|
|
UPDATE DatiFase SET modificatoDa = 'Maurizio Molteni'
|
|
GO
|
|
|
|
-- update tab storiche
|
|
UPDATE Storico_DatiCommessa SET modificatoDa = 'Maurizio Molteni'
|
|
UPDATE Storico_DatiCommForn SET modificatoDa = 'Maurizio Molteni'
|
|
UPDATE Storico_DatiCommInteg SET modificatoDa = 'Maurizio Molteni'
|
|
UPDATE Storico_DatiFase SET modificatoDa = 'Maurizio Molteni'
|
|
GO
|
|
|
|
-- riabilito i triggers
|
|
ENABLE TRIGGER DatiCommessa.trg_DC_storicizza ON DatiCommessa;
|
|
ENABLE TRIGGER DatiCommForn.trg_DCF_storicizza ON DatiCommForn;
|
|
ENABLE TRIGGER DatiCommInteg.trg_DCI_storicizza ON DatiCommInteg;
|
|
ENABLE TRIGGER DatiFase.trg_DF_storicizza ON DatiFase;
|
|
GO
|
|
|
|
|
|
commit;
|
|
go
|
|
|
|
|
|
|
|
|
|
|
|
-- registro versione...
|
|
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(225, GETDATE())
|
|
GO
|
|
SELECT TOP 10 * FROM LogUpdateDb ORDER BY Versione DESC
|
|
GO
|