Results 1 to 4 of 4

Thread: Trigger Problem

  1. #1
    Join Date
    Dec 2003
    Posts
    148

    Unanswered: Trigger Problem

    Hi all. I have a seq and trigger set up for an autonumber type of column in my DB.
    the trigger is:

    create or replace trigger tracker_seq
    before insert on tbl_tracker
    for each row
    begin
    select tracker_seq.nextval
    into :new.number
    from dual;
    end;
    /

    I believe since the column is named "number" it is generating an error. The table and data was moved from another DB and already contains 30k plus rows. Is there any way to specifiy the number column without generating an error? Thank you.

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Thumbs down

    Try:

    into :new."NUMBER"

    Not good ide to have columns with same name as Oracle reserved words!

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Dec 2003
    Posts
    148

    :-[

    grrrr...
    No dice on that....yeaah, you're so right about the column name but Im not sure what I'm supposed to dooooo....any other ideas?

    this is the exact error i get....
    Code:
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-320: the declaration of the type of this expression is
    incomplete or malformed

  4. #4
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713
    Mybe:

    ":NEW"."NUMBER"

    will work?
    Make sure also that the column name is not lower case.

    ":NEW"."Number" or ":NEW"."number"
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

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