var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: User information!!
I'm trying to get the information about the user who modified the record in the table. I'm able to capture the datetime of modification through trigger.
CREATE TRIGGER [upd_dtm] ON dbo.Sample
FOR INSERT, UPDATE
UPDATE Sample SET update_dtm = (SELECT GETDATE())
WHERE Sample.ID IN (SELECT ID FROM inserted)
I'm stuck, how to get the User who modified it?
Any help is greately appreciated!
Search for NILADIC functions in Books Online.
Can't you just give it to him/her?
SELECT SYSTEM_USER, USER
EDIT: And I still don't even inderstand the definition
A Niladic (or Nullary) function is one that takes no arguments.
'Cause there are several, and they return subtley different results so why parrot Books Online?
Teach a man to fish...
OK, I'm just lazy. A lazy DBA.
I got it..
I used current_user function.
I think you want SYSTEM_USER though....
Yep, System_user is the correct one. thanks.