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

Home -> Community -> Usenet -> c.d.o.server -> Re: Insert problems

Re: Insert problems

From: <masyedkasim_at_hotmail.com>
Date: Tue, 16 Nov 1999 15:14:20 GMT
Message-ID: <80rsc6$2c5$1@nnrp1.deja.com>


Try this...

INSERT INTO TABLE1(FIELD1, FIELD2) SELECT SEQ.NEXTVAL, FIELD2 FROM TABLE1 WHERE ID = 1; In article <38316312.31184EE7_at_planetinternet.nl>,   Dirk Joosen <d.joosen_at_planetinternet.nl> wrote:
> Hi,
>
> I want to do the following:
>
> INSERT INTO TABLE1(FIELD1, FIELD2) VALUES(SEQ.NEXTVAL, (SELECT
> FIELD2 FROM TABLE1 WHERE ID = 1));
>
> The reason for this statement is that the value with id 1 is an
> default value and I want a copy of this.
> But it doesn't work I become ORA-00936: missing expression error
> and I don't no why.
> regards Dirk
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Nov 16 1999 - 09:14:20 CST

Original text of this message

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