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.
| Author |
Topic |
|
sneh sharma
Starting Member
4 Posts |
Posted - 2008-06-19 : 06:14:22
|
| Hi,I have a query regarding DML Triggers.I have created a trigger ON a table AFTER Insert, Update staement. In the trigger's body I am making a call to a stored procedure. In the procedure, I want to know the Trigger invoked due to which event : insert or Update as I have to handle bith the cases differently.But I am not able to find out any SQL server function or property which can distinguish between INSERT and Update events of a trigger. Waiting for the needful. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
PeterNeo
Constraint Violating Yak Guru
357 Posts |
Posted - 2008-06-19 : 07:42:06
|
| try thisSELECT TE.*FROM sys.trigger_events AS TEJOIN sys.triggers AS TON T.object_id = TE.object_idWHERE T.name = <triggername>-- AND T.parent_class = 0 |
 |
|
|
|
|
|