Please help! Show only duplicates

Please help! Show only duplicates

Post by Frank Ura » Sat, 22 Jun 2002 00:15:21



Hi everybody

I have the following records:
A100123 85000   85100   85140   85124
A100124 85000   85100   85110   85119
A100125 85000   85200   85210   85211
A100126 85000   85100   85140   85124
A100127 85000   85100   85130   85132
A100127 85000   85100   85130   85144
A100128 85000   85100   85150   85155
A100128 85000   85100   85150   85152

I would need a query witch gives only the duplicates back.
The result should look like that:
A100127 85000   85100   85130   85132
A100127 85000   85100   85130   85144
A100128 85000   85100   85150   85155
A100128 85000   85100   85150   85152

Does anybody know that??

Thanks for any answer
Frank Uray

 
 
 

Please help! Show only duplicates

Post by Mike Wad » Sat, 22 Jun 2002 00:39:34


I assume that the first column is the one on which u want
to test for dupes.

SELECT * from MyTable WHERE Column1 IN (SELECT Column1
FROM MyTable GROUP BY Column1 HAVING COUNT(*)>1)

Quote:>-----Original Message-----
>Hi everybody

>I have the following records:
>A100123     85000   85100   85140   85124
>A100124     85000   85100   85110   85119
>A100125     85000   85200   85210   85211
>A100126     85000   85100   85140   85124
>A100127     85000   85100   85130   85132
>A100127     85000   85100   85130   85144
>A100128     85000   85100   85150   85155
>A100128     85000   85100   85150   85152

>I would need a query witch gives only the duplicates back.
>The result should look like that:
>A100127     85000   85100   85130   85132
>A100127     85000   85100   85130   85144
>A100128     85000   85100   85150   85155
>A100128     85000   85100   85150   85152

>Does anybody know that??

>Thanks for any answer
>Frank Uray
>.


 
 
 

Please help! Show only duplicates

Post by Frank Ura » Sat, 22 Jun 2002 01:05:47


Thanks a lot, it worked fine!

Quote:>-----Original Message-----
>I assume that the first column is the one on which u want
>to test for dupes.

>SELECT * from MyTable WHERE Column1 IN (SELECT Column1
>FROM MyTable GROUP BY Column1 HAVING COUNT(*)>1)

>>-----Original Message-----
>>Hi everybody

>>I have the following records:
>>A100123 85000   85100   85140   85124
>>A100124 85000   85100   85110   85119
>>A100125 85000   85200   85210   85211
>>A100126 85000   85100   85140   85124
>>A100127 85000   85100   85130   85132
>>A100127 85000   85100   85130   85144
>>A100128 85000   85100   85150   85155
>>A100128 85000   85100   85150   85152

>>I would need a query witch gives only the duplicates
back.
>>The result should look like that:
>>A100127 85000   85100   85130   85132
>>A100127 85000   85100   85130   85144
>>A100128 85000   85100   85150   85155
>>A100128 85000   85100   85150   85152

>>Does anybody know that??

>>Thanks for any answer
>>Frank Uray
>>.

>.

 
 
 

1. Need query to show duplicates only-please help

Hi all, I have a table that I need to query
to show only duplicate DocNums and an associated field
called DocType.

Example of desired output:

DocNum    DocType
-------- ----------
92-155     TOP
92-155     ROP
92-155     HOR
02-999     TOP
02-999     ROP

The following was suggested on another site, but will not
work with SQL Server:

SELECT     DocNum, DocType
FROM         leDocs
WHERE     (docnum, doctype) IN
                          (SELECT     docnum, doctype
                            FROM          ledocs
                            GROUP BY docnum, doctype
                            HAVING      COUNT(*) > 1)
ORDER BY docnum, doctype

Any help will be appreciated, thanks, Andy

2. Recordset Field Constraints (Meta data)

3. COMBO BOX, PLEASE HELP, PLEASE HELP, PLEASE HELP!

4. Trouble with ERWin

5. dependancies not showing - URGENT HELP PLEASE !!

6. Ingres II 2.0/9808 with Sinix-Y 5.43 problems

7. Report not showing in exe, please help

8. Data Export...

9. Removing Duplicates Please Help!

10. Please help with this "Duplicates" query

11. Need to query for duplicates only-please help

12. Please help - Trying to duplicate db for testing

13. Please help database duplicate names