To get the totals add -- col3,total)SELECT......--col3,COUNT(*)..
RRR

> Dennis McGrath wrote:
> 
> insert into savetable (col1, col2, col3) select col1, col2, col3 from
> TestTable group by col1, col2, col3 having count(*) > 1
> 
> This will give you one row for each unique set of duplicate values.
> 
> -- Dennis McGrath
> mailto:[EMAIL PROTECTED]
> 
> -- Productivity Tools for R:Base Programmers
> http://www.enteract.com/~mcgrath/dennis
> 
> -- Full time consultant with:
> SQL Resources Group
> Steve Hartmann
> Oak Park, IL
> mailto:[EMAIL PROTECTED]
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of suredata
> Sent: Tuesday, August 07, 2001 4:36 PM
> To: [EMAIL PROTECTED]
> Subject: Capturing duplicates
> 
> I have a three-column table (say TestTable with columns Col1, Col2, Col3).
> Duplicates are present.  I want to save all duplicates in a table or file.
> Is there an easy way to achieve this?
> 
> 
> 
> TIA
> 
> 
> 
> Stan Loo

Reply via email to