Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query to show only duplicate records (2003)

    I need to produce a query to show only duplicate records, see attachment records highlighted in red are those l want to show in result of query. Any help would be appreciated.
    Attached Images Attached Images

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query to show only duplicate records (2003)

    Group by that filed add a second instance of the field and use a count summary and use a criteria aof >1
    Attached Images Attached Images

  3. #3
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Brussels, Brussel, Belgium
    Posts
    159
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query to show only duplicate records (2003)

    assuming your tabel is called table1 and the field is called field1, the following SQL statement should do it:

    SELECT DISTINCT table1.field1 FROM table1 INNER JOIN (SELECT field1 FROM table1 GROUP BY field1 HAVING COUNT (*) >1) as Tbl1 ON table1.field1 =Tbl1.field1;

  4. #4
    4 Star Lounger
    Join Date
    Jul 2006
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query to show only duplicate records (2003)

    That works great thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •