DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Trigger for generating Sequence

  1. #1
    Join Date
    Sep 2000
    Location
    VA
    Posts
    343

    Trigger for generating Sequence

    Hi, the following trigger is generating Compilation errors :

    CREATE TRIGGER test_auto_id BEFORE INSERT ON test for each row BEGIN SELECT test_id.nextval INTO :new.ID from dual ; END

    I think it has something to do with my usage of ":new" - Any ideas ?

    Thanks.

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    perhaps you could share the error message with us
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Sep 2000
    Location
    VA
    Posts
    343
    No Description. Just a message : "Warning: Trigger created with compilation errors."

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    type ...

    show errors
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  5. #5
    Join Date
    Sep 2000
    Location
    VA
    Posts
    343
    Thanks Slimdave. Was just missing a ';' at the end - so silly.

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