Re: Trigger
From: Banana Joe (homsa_at_spray.se)
Date: 03/09/04
- Next message: Dan Guzman: "Re: Trigger to Allow UNIQUE Values or Multiple NULL Values?"
- Previous message: Per Williamson: "Sql server agent fails to start on reboot"
- In reply to: Uri Dimant: "Re: Trigger"
- Messages sorted by: [ date ] [ thread ]
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
> >
> >
> >
> >
>
>
- Next message: Dan Guzman: "Re: Trigger to Allow UNIQUE Values or Multiple NULL Values?"
- Previous message: Per Williamson: "Sql server agent fails to start on reboot"
- In reply to: Uri Dimant: "Re: Trigger"
- Messages sorted by: [ date ] [ thread ]