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: OK Gurus - one to test you re Triggers

Re: OK Gurus - one to test you re Triggers

From: Andy Hardy <aph_at_ahardy.demon.co.uk>
Date: Sat, 21 Aug 1999 19:32:34 +0100
Message-ID: <tHWDbAACDvv3EwJm@ahardy.demon.co.uk>


In article <37B970EF.B05F76E4_at_spamme.ed.ac.uk>, Fraser Boswell <Fraser.Boswell_at_spamme.ed.ac.uk> writes
>Sorry if this doesnt make sense to you, I havent quite got it myself.
>Say I have a cursor which holds all the fieldnames and I load the
>fieldname into a variable called colname.
>in a For Cursor Loop I want to reference each column from it's name in
>the colname
>So in the After Update query I want to write:
> IF :NEW.colname != :OLD.colname THEN -- field has been updated
> --etc
> END IF;
>except :NEW.colname gives me a bad bind variable error.
>How do you get round this. Dynamic SQL?

Sounds like it... although probably simpler and more obvious to just have lots of IF..END IFs.

Andy
--
Andy Hardy. PGP key available on request


Received on Sat Aug 21 1999 - 13:32:34 CDT

Original text of this message

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