Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Newbie sequence problem.
All I find about sequences states that a sequence CURRVAL should be available to everything except "as columns", "in subqueries", and a few other circumstances. No mention of being unavailable to triggers. The realavant sequence works for inserts, but the following trigger failes at compile time without ora-.. error message:
CREATE OR REPLACE TRIGGER trigger1 AFTER INSERT ON table1 DECLARE varialbe1 table1.primarykey%TYPE; BEGIN
variable1 := table1SequenceID.CURRVAL; ... code that works if variable 1 is substitutedEND; The offending line is the second line. Remove it, and the whole thing works. Any clues?
Note the sig below if your going to reply via mail. Sorry, but I'm on uucp.
Thank you for any help.
\\ ~ ~ // ( @ @ ) ===============-oOOo-(_)-oOOo-==================Red Hat Linux! Where I really went today! Please send personal replies to the address derived by removing the "x" from the
=========================-Oooo.-================ .oooO ( ) ( ) ) / \ ( (_/ `'Received on Thu Feb 26 1998 - 00:00:00 CST