Duplicate in a querie

B

Brendanpeek

i need a query that will display the values in the field but i do not want
the query to show duplicate values.
 
M

Michel Walsh

SELECT DISTINCT fieldName
FROM tableName


or


SELECT fieldName
FROM tableName
GROUP BY fieldName



The second syntax can be expanded to include the number of time each value
occur, as example,with:


SELECT fieldName, COUNT(*)
FROM tableName
GROUP BY fieldName




Vanderghast, Access MVP
 
B

Brendanpeek

Thanks That was great

Michel Walsh said:
SELECT DISTINCT fieldName
FROM tableName


or


SELECT fieldName
FROM tableName
GROUP BY fieldName



The second syntax can be expanded to include the number of time each value
occur, as example,with:


SELECT fieldName, COUNT(*)
FROM tableName
GROUP BY fieldName




Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top