We are writing a trigger to track when changes are made to a particular table. Unfortunately, this particular table does not have a column like "MODIFIEDBY". Isn't there a global variable I can retrieve from within a SQL trigger?
create trigger [trackEmployeeAdditions] on UPR00100
for insert
as
insert trackPayrollChanges
select system_user,'UPR00100','Inserted Record',getdate(),'Inserted Record','Inserted Record',EMPLOYID,
'Employee '+rtrim(EMPLOYID)+' was added' from inserted
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.