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: sequence.nextval ?

Re: sequence.nextval ?

From: Phil R Lawrence <prlawrence_at_lehigh.edu>
Date: Fri, 14 Jan 2000 15:29:04 -0500
Message-ID: <85o0uh$ch0@fidoii.CC.Lehigh.EDU>

I wrote:

> I want to insert the nextval along with the results of a SELECT into a
> table. Can't seem to get the syntax right. Oracle books don't cover this
> one in the examples. I've tried:

The examples should be clearer ths way:



INSERT into table

    (
    dupcheckid,
    field1,
    ...
    )
VALUES
    (
    dupcheckid.nextval,
    (
    <*>select

        field1,
        ...

    )
    )

ORA-00936: missing expression (DBD: error possibly near <*> indicator

and



INSERT into table

    (
    dupcheckid,
    field1,
    ...
    )
    select

       dupcheckid.<*>nextval,
        field1,
        ...
____________________

ORA-02287: sequence number not allowed here (DBD: error possibly near <*> indicator

Thanks for any help,
Phil R Lawrence Received on Fri Jan 14 2000 - 14:29:04 CST

Original text of this message

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