I have a trigger that writes data to a history table, one field in this table is the iUserID field. This field is taken from the iUserID field in the Inserted table, however in actual fact it's taking the data from an old history record rather than the person who actually updated the data. I have run a trace to see where this data is changing and all I'm getting back is the trigger that's firing, this is correct but I think there must be an action prior to this that I'm missing on the trace that's updating the table and therefore populating the Inserting table when I run the update. Can someone please advise me on what I should tick to ensure that all scripts run are returned. I have already ticked under stored procedures the SP:StmtComplted and SP:StmtStarting columns to ensure I get the triggers that are fired.Please let me know if you need more information, I know this looks messy but I can't but the code in as it's 2500 lines long.
asked Mar 07 '11 at 07:20 AM in Default
is the trigger looking for more than one row in the Inserted table? - h ttp://msdn.microsoft.com/en-us/library/ms190752.aspx
answered Mar 07 '11 at 08:13 AM