Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: pl sql
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
![]() |
![]() |