[RESOLVED] Whats the SQL (Access) statement to eliminate

recurring instances of the same value in a list?
In other words I need to create a list (a query) that contains all values of a certain field, each value listed just once.
Thanks.
[187 byte] By [tamaro] at [2007-11-20 1:50:16]
# 1 Re: [RESOLVED] Whats the SQL (Access) statement to eliminate
You have the SELECT DISTINCT clause, but this clause should be used very carefuly. Sometimes the result of a query is doubled because of a wrong usage of joins.
DanielaTm at 2007-11-9 13:44:17 >
# 2 Re: [RESOLVED] Whats the SQL (Access) statement to eliminate
Avoid using DISTINCT simply to knock out duplicates.. figure out why they are there in the first place and be more careful with your joins..

Using DISTINCT carelessly causes poor performance, because you effectively ask the database to join two tables, and (because you didnt specify the join very well) it generates, say, 200,000 records. You then ask it to knock out repeated rows with distinct, and it reduced this to 50,000. If you specify the joins correctly initially, then the database only works to generate 50,000 rather than generate then remove 150,000 useless ones.
cjard at 2007-11-9 13:45:17 >