Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 trigger

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2009-11-18 : 04:08:03
Hi,
A table i.e. tblMain is updated by three different process methods, i.e.
1)Manual
2)Rules
3)System

There is a field in tblMain called ProcessID which indicates one of the ProcessIDs above.
There is a trigger on tblMain for when this table gets updated and so an Audit table gets populated.

Question:
How can I let the trigger know what process is updating tblMain so that when the trigger is called and the Audit table is being populated, I would like the Audit table to know what process updated tblMain.

Thanks

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-11-18 : 10:45:54
show us the update query and the table DDL
Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2009-11-19 : 03:56:02
i have decided not to use triggers in this case.
Thanks
Go to Top of Page
   

- Advertisement -