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: pl sql

Re: pl sql

From: Tom Grenier <tom_at_sqlman.com>
Date: Mon, 19 Nov 2001 19:37:46 -0800
Message-ID: <3BF9D00A.A853313@sqlman.com>


How about something like:

insert col1 into dup_table from source_table where col1 in (select col1 from source_table group by col1 having count(*) > 1);

insert col1 into unique_table from source_table where col1 in (select col1 from source_table group by col1 having count(*) = 1);

Tom

mort wrote:

> I am wondering how to write a pl sql statement that will do 2 things
> find duplicates in a file based on 1 column. I want to write all
> duplicates to one table then put all non duplicates into another table
> in the same script
Received on Mon Nov 19 2001 - 21:37:46 CST

Original text of this message

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