DaveJohnson
Technical User
I have created the following update trigger which works, what need to do is set the SET @Project and @Value with the values of two fields in the PA01201 table.
CREATE TRIGGER [CheckUpdate] ON [dbo].[PA01201]
FOR UPDATE
AS
if update (SUTASTAT)
BEGIN
DECLARE @sys_usr char(30), @sys_timestamp datetime, @Project as char(15), @Value as char(3)
SET @sys_usr = SYSTEM_USER
SET @sys_timestamp = getdate()
SET @Project = '234567'
SET @Value = 'CO'
INSERT INTO Audit_PA01201_SUTASTAT VALUES (@Project, @sys_usr, @sys_timestamp, @Value, (newid()) )
END
Thanks
Dave Johnson.
CREATE TRIGGER [CheckUpdate] ON [dbo].[PA01201]
FOR UPDATE
AS
if update (SUTASTAT)
BEGIN
DECLARE @sys_usr char(30), @sys_timestamp datetime, @Project as char(15), @Value as char(3)
SET @sys_usr = SYSTEM_USER
SET @sys_timestamp = getdate()
SET @Project = '234567'
SET @Value = 'CO'
INSERT INTO Audit_PA01201_SUTASTAT VALUES (@Project, @sys_usr, @sys_timestamp, @Value, (newid()) )
END
Thanks
Dave Johnson.