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

Home -> Community -> Usenet -> c.d.o.server -> Re: Sequences

Re: Sequences

From: Andre Vergison <avergison_at_skynet.be>
Date: Sun, 22 Jul 2001 13:09:10 +0100
Message-ID: <3B5AC266.8AF7167B@skynet.be>

In 8.1.7 I get :

  1 select z1seq.nextval, dummy from dual   2 union all
  3* select z2seq.nextval, dummy from dual SQL> /
select z1seq.nextval, dummy from dual

             *
ERROR at line 1:
ORA-02287: sequence number not allowed here

Indeed, the 8.1.7 SQL Reference, on p. 2-60, says :

"
Restrictions: You cannot use CURRVAL and NEXTVAL:
- A subquery in a DELETE, SELECT, or UPDATE statement

What Oracle version (w/o error) where you using ?

Andre

Billy Verreynne wrote:

> "Daniel A. Morgan" <Daniel.Morgan_at_attws.com>
>
> > > Was wondering what is the reason behind sequences not generating
> > > numbers when used in a UNION. Also, why does Oracle tell you no-no and
> > > perform the SQL without any errors?
 
Received on Sun Jul 22 2001 - 07:09:10 CDT

Original text of this message

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