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 -> SQL Insert Question

SQL Insert Question

From: Phil Cook <pncook_at_worldnet.att.net>
Date: 1997/09/19
Message-ID: <01bcc4a2$1d817260$607293cf@default>#1/1

This query does not filter out the records that already exist, and I get primary key constraint violated. I broke the query into two PL/SQL sections to get it to work. Thanks in advance....

insert into table1
select a.primary_key from table2 a where not exists ( select * from table1 b

   where a.primary_key = b.primary_key ); Received on Fri Sep 19 1997 - 00:00:00 CDT

Original text of this message

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