Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL SERVER TRIGGER TRANSLATION

Re: SQL SERVER TRIGGER TRANSLATION

From: Jon Waterhouse <jonwaterhouse_at_gov.nf.ca>
Date: Thu, 27 Jun 2002 13:29:05 -0230
Message-ID: <3d1b36c6$1@news.mhogaming.com>


I think you will need a "FOR EACH ROW" at the top of the trigger.

You can probably dispense with the variable and write:

UPDATE Trig_ResAppelStat SET Cpt=Cpt+1 WHERE ResAppel = :new.ResAppel

"Fred Burlaud" <fburlaud_at_com6.fr> wrote in message news:3D19FA47.9010405_at_com6.fr...
> Hello,
>
> I fail in translating this sql server trigger with the oracle syntax
> especially on the syntax "from inserted"
>
> thank you ;o)
> Fred
>
>
> CREATE TRIGGER TR_UPDATE_ResAppelHisto
> ON ResAppelHisto
> FOR UPDATE
> NOT FOR REPLICATION
>
> AS
> IF UPDATE(ResAppel)
> BEGIN
> DECLARE @cpResAppel int
> SELECT @cpResAppel = ResAppel FROM inserted
> UPDATE Trig_ResAppelStat SET Cpt=Cpt+1 WHERE ResAppel =
> @cpResAppel
> END
>
Received on Thu Jun 27 2002 - 10:59:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US