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

Home -> Community -> Mailing Lists -> Oracle-L -> :new and :old

:new and :old

From: Kean Jacinta <jacintakean_at_yahoo.com>
Date: Thu, 16 Jun 2005 05:47:54 -0700 (PDT)
Message-ID: <20050616124754.69109.qmail@web52901.mail.yahoo.com>


Hi,

i have declare a cursor in my trigger called cur1. I am trying to refer :OLD.<dynamicfieldname> :NEW.<dynamicfieldname> from the cursor. I got an error

PLS-00049 bad-bind variable. I am not sure if oracle support this. If this way is not gonna work then what can you pls suggest other method to acheive the same result.

THank YOU
JKean  

Declare
CURSOR cur1 IS

    SELECT FIELDNAME

      FROM TRACKFLD 
     WHERE TRACKTABLENAME = 'COMPANY_MASTER'

Begin
 FOR cur1_rec IN cur1

LOOP       INSERT INTO AUDITLOG
(FIELDNAME,AUDITBEFOREVALUE,AUDITAFTERVALUE)              VALUES
(:FIELDNAME,:OLD.cur1_rec.FIELDNAME,:NEW.cur1_rec.FIELDNAME);       

END LOOP;                    



Discover Yahoo!
Have fun online with music videos, cool games, IM and more. Check it out! http://discover.yahoo.com/online.html
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jun 16 2005 - 08:53:03 CDT

Original text of this message

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