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

Home -> Community -> Usenet -> c.d.o.tools -> create view as select a sequence.nextval

create view as select a sequence.nextval

From: Colum Mylod <cmylod-deleteme_at_bigfoot.com>
Date: Fri, 20 Jul 2001 10:31:56 +0100
Message-ID: <eauflt4lqm28nl63s8k525nbj2h5tcsoki@4ax.com>

Oh wise ones

This worked in pre-816 but gives ORA-2201 "sequence not allowed here" in 816:

create sequence seq;

create view myseq_view as select seq.nextval from sys.dual;

We have a need to hide a sequence in a view (or table but that turns it static), is there a way to do this? I searched Google where someone did something similar with functions but this too doesn't "take" in 816.

02201, 00000, "sequence not allowed here"
// *Cause: An attempt was made to reference a sequence in a
from-list.
// *Action: A sequence can only be referenced in a select-list.
Headers spam-proofed. Use cmylod at bigfoot . com Received on Fri Jul 20 2001 - 04:31:56 CDT

Original text of this message

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