Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trouble with Oracle Lite v5.0.2
Princess Morgiah wrote:
> "DA Morgan" <damorgan_at_exesolutions.com> wrote in message
> news:3E346F9C.3B7302A2_at_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.
>
>
>
>
I do ... your second select statement made no sense. That is why in my example I ignored it and just put in three dots.
Daniel Morgan Received on Sun Jan 26 2003 - 20:03:46 CST
![]() |
![]() |