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 -> Re: Trouble with Oracle Lite v5.0.2

Re: Trouble with Oracle Lite v5.0.2

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Sun, 26 Jan 2003 15:30:36 -0800
Message-ID: <3E346F9C.3B7302A2@exesolutions.com>


Princess Morgiah wrote:

> Hi everybody,
>
> I don't know whether or not this is the correct group to ask, but this seems
> the most likely.
>
> I'm working with Oracle Lite v5.0.2 and I am stuck with a simple insert
> statement. Whenever I execute the query in msql, I get an error (pol-5233):
> sequence not allowed here. If I run the insert with values instead of
> subqueries, everything works fine.
>
> Could anybody please shed some light on this? I have no idea why this does
> not work.
>
> --- insert ---
> insert into tumarch.tag (seq, tag, tagtype, collection, saved)
> values ((select tumarch.seq_tumarch.nextval from dual), 'Leuven', 2, (Select
> seq from tumarch.collection where name = 'TestCollection'), 1);
> [POL-5233] sequence not allowed here
>
> --- table tag ---
> describe tag
> Name Null? Type
> ------------------------------- ----- -------
> SEQ N NUMBER(10)
> COLLECTION N NUMBER(10)
> TAG N VARCHAR(250)
> TAGTYPE N NUMBER(1)
> SAVED N BIT(1)
>
> --- table collection ---
> describe collection
> Name Null? Type
> ------------------------------- ----- -------
> SEQ N NUMBER(10)
> COLLECTION N NUMBER(10)
> TAG N VARCHAR(250)
> TAGTYPE N NUMBER(1)
> SAVED N BIT(1)
> ---
>
> Thanks in advance,
>
> Princess Morgiah

Correct your code to:

insert into tumarch.tag
(seq, tag, tagtype, collection, saved)
values
(tumarch.seq_tumarch.NEXTVAL, 'Leuven', 2, ...

Do don't do a select from dual in an insert statement.

Daniel Morgan Received on Sun Jan 26 2003 - 17:30:36 CST

Original text of this message

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