Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Newbie sequence problem.

Newbie sequence problem.

From: Tom Redfern <herald_at_jeeves.seaxslug.org>
Date: 1998/02/26
Message-ID: <Pine.LNX.3.95.980226072657.31311A-100000@jeeves.seaslug.org>#1/1

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 substituted
END; 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
  following address: thos_at_jeeves.seaxslug.org
=========================-Oooo.-================
                .oooO     (   )
                (   )      ) /
                 \ (      (_/
                  `'
Received on Thu Feb 26 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US