PLS-00049: bad bind variable
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: PLS-00049: bad bind variable

  1. #1
    Join Date
    Dec 2002
    Location
    Singapore
    Posts
    27

    PLS-00049: bad bind variable

    Hi,
    I'm getting this error PLS-00049: bad bind variable 'OLD.USER_ID' when i execute this trigger.Pls do let me know whats wrong in this trigger.The syntax of the trigger is as follows:

    CREATE OR REPLACE TRIGGER MRM2A.TR_PRE_UPD_CUS_MSTR_PIN BEFORE UPDATE OF INT_ID,PRG_CD,PIN, PIN_STATUS_IND,
    PIN_EXP_IN_DAYS ON MRM2A.CUS_MSTR_PIN REFERENCING OLD AS Old NEW AS New FOR EACH ROW
    Begin
    if nvl(:old.int_id,'x') <> nvl(:new.int_id,'x') then
    insert into cus_mstr_pin_aud(fld_id, dt_time_stamp, upd_del_ind, audit_user_id, user_id, old_value, new_value)
    values ('INT_ID', sysdate, 'U', pa_audit.user_id, :old.user_id, :old.int_id, :new.int_id);
    end if;
    I have 2 tables one normal table and another is an audit table.
    Your suggestions are greatly appreciated.
    Thanks,
    Last edited by marist89; 08-18-2004 at 08:21 AM.
    K.M.Ramakrishnan

  2. #2
    Join Date
    Jun 2004
    Location
    Ludhiana (Pb.) INDIA
    Posts
    12
    i think u've missed the : before OLD
    Vikas Verma
    ___________
    It is the mark of an educated mind to be able to entertain a thought without accepting it.
    __________
    Aristotle

  3. #3
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Where does "pa_audit.user_id" come from?

  4. #4
    Join Date
    Jun 2004
    Location
    Ludhiana (Pb.) INDIA
    Posts
    12
    what is the structure of both tables?
    Vikas Verma
    ___________
    It is the mark of an educated mind to be able to entertain a thought without accepting it.
    __________
    Aristotle

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width