Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003
    Location
    Edmonton Alberta Canada
    Posts
    41

    Unanswered: Pass entire row as argument to a precedure

    Hi, How do I pass the ld and :new as parameter to a precedure? I am getting

    PLS-00049: bad bind variable 'OLD'.

    I need to get the entire row.

    Thanks in advance!

    -Mongo

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Pass entire row as argument to a precedure

    It can't be done, I'm afraid. You have to reference each :old and :new value individually, like this:
    PHP Code:
    create trigger emp_trg after update of emp
    for each row
    declare
      
    old_rec emp%rowtype;
      
    new_rec emp%rowtype;
    begin
      old_rec
    .empno := :old.empno;
      
    old_rec.ename := :old.ename;
      ...
      
    new_rec.empno := :new.empno;
      
    new_rec.ename := :new.ename;
      ...
      
    emp_procold_recnew_rec );
    end

  3. #3
    Join Date
    May 2003
    Location
    Edmonton Alberta Canada
    Posts
    41
    oh great. i've got 25 columns in a row.

  4. #4
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Only 25? But yes, it is irritating. This question comes up quite often!

Posting Permissions

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