You sure can

CREATE TEMP TABLE DupList
(Col1 int, Col2 int, Col3 int)

INSERT INTO DupList
  SELECT Col1,Col2,Col3 
  FROM OriginalTable t1,
    (SELECT Col1,Col2,Col3 FROM Original table
     group by Col1,col2,col3 having count(*) > 1) as t2
  WHERE t2.Col1 = t1.Col1 AND t2.Col2 = t1.Col2 AND t2.Col3 = t1.Col3



"suredata" <[EMAIL PROTECTED]> wrote:

>Thank you Bill, Ron, Dennis, Phil, and Albert for responding.  Apparently I did not 
>make myself clear enough as to what I want.
>
>I need to save all duplicate rows to a new table or file, not just knowing which rows 
>in the original table have one or more duplicates.  In other words, if a row in the 
>original table has 5 duplicates (or 6 identical rows in the table), I want to save 
>these five duplicates as separate rows in a new table.   This new table would contain 
>nothing but all duplicates in the original table.  Is there an easy way to achieve 
>this?
>
>I hope this is clearer.  Thanks again
>
>Stan Loo
>


__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

Reply via email to