Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Inside Before Update and Before Insert triggers
Thu, Apr 8 2010 5:43 AMPermanent Link

Tiago Ameller

Menorca Zeros i Uns SL

Avatar

I have many tables with an exact copy of Before Update & Before Insert triggers. Since last builds I've observed I can create a trigger of kind "BEFORE ALL". If that kind of triggers is fired on both before Insert and Update, it would be nice to have two functions to know in what trigger am I: GETTRIGGERACTIONTIME (BEFORE|AFTER|ERROR) and GETTRIGGERTYPE (INSERT|UPDATE|DELETE) in order to avoid to duplicate a lot of code.
Thu, Apr 8 2010 8:24 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tiago


From a reply by Tim to my post about "all" triggers

You can use the OPERATION() function to determine what
is going on:

Insert
Update
Delete
Error
all VARCHARs, returned from OPERATION exactly as listed.

Roy Lambert [Team Elevate]
Thu, Apr 8 2010 1:47 PMPermanent Link

Tiago Ameller

Menorca Zeros i Uns SL

Avatar

Roy,

Thanks! I was getting insane looking for such a function in docs, but, I did not found it. I think this useful function is missing in pdf and help files.

I'll use it a lot.
Thu, Apr 8 2010 2:16 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tiago


>Thanks! I was getting insane looking for such a function in docs, but, I did not found it. I think this useful function is missing in pdf and help files.
>

Its not missing, its a "sneak in" so it isn't documented yet. I spotted it and asked Tim.

Roy Lambert [Team Elevate]
Image