If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Ignore Duplicates SQL Question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-15-05, 01:32
johneliot johneliot is offline
Registered User
 
Join Date: Nov 2005
Posts: 5
Question Ignore Duplicates SQL Question

HI,

Is there any way in SQL to run a query and weed out all the duplicates from the result so that you are only left with unique records. Can this be based on one of the fields of the record for the checking part? I have a query that produces a number of results and its drawing them from multiple tables with the same fields in each table, and some of the records and duplicates that i would like to ignore in my report. Anyone know a way? I am using Access.

Kind Regrads,
John Eliot
Reply With Quote
  #2 (permalink)  
Old 11-15-05, 04:53
madafaka madafaka is offline
Registered User
 
Join Date: Feb 2004
Location: Dublin, Ireland
Posts: 212
Hi johneliot,
there was a similar problem discussed couple days ago:
http://www.dbforums.com/t1201578.html

You can use DISTINCT or GROUP BY. See mentioned thread for details. You'll find what's the difference and how to use both DISTINCT and GROUP BY.

If you'll have troubles anyway, don't hesitate to ask, but post your select statement, your sample data end your result expectation as well.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On