Re: Trigger

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Banana Joe (homsa_at_spray.se)
Date: 03/09/04


Date: Tue, 9 Mar 2004 14:59:37 +0100

Ah,

thanks, I thought it would be an easy thing, but i just did not think of
that!

Thanks Again!

/B

"Uri Dimant" <urid@iscar.co.il> wrote in message
news:#OcrTmdBEHA.2804@tk2msftngp13.phx.gbl...
> Banana
> Check into the trigger
> IF EXISTS(select * from inserted ) and EXISTS( select * from deleted)
> print 'Trigger is fired for update'
> IF EXISTS(select * from inserted )
> print 'Trigger is fired for insert'
> ELSE
> print 'Trigger is fired for delete'
>
>
>
> "Banana Joe" <homsa@spray.se> wrote in message
> news:erRiWhdBEHA.2352@TK2MSFTNGP12.phx.gbl...
> > Hi,
> >
> > I have one trigger for UPDATE, INSERT.
> >
> > I am doing some operations with both insert and updates, but now I need
to
> > find out if the trigger was fired from an INSERT or from an
> > UPDATE -transaction.
> >
> > Can anyone give a clue how to find this out?
> >
> > /Bernhard
> >
> >
> >
> >
>
>