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

sequence.nextval ?

From: Phil R Lawrence <prlawrence_at_lehigh.edu>
Date: Fri, 14 Jan 2000 15:17:16 -0500
Message-ID: <85o08c$nb8@fidoii.CC.Lehigh.EDU>


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:



INSERT into table

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

        field1,
        ...
____________________

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

and



INSERT into table

    (
    dupcheckid,
    ...
    )
    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:17:16 CST

Original text of this message

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