Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

no duplicates in query?

Status
Not open for further replies.

doerfohio

Technical User
Aug 30, 2004
34
US
I've got a query (TrackingQuery) with over 100,000 records showing each time a member visits our facility. Of course, most memberID's show up quite a few times. Can I make each one just show up once? I'd like a total of how many different members visit, rather than how many total visits.

TrackingQuery has the following fields:
MemberID
InTime
InDate

Baby-steps please! I don't know Access terminology very well.

Thanks,
Dori
 
the use of the DISTINCT keyword right after the SELECT keyword would give you no duplicates...

--------------------
Procrastinate Now!
 
SELECT Count(*) AS CountOfUniqueMembers
FROM (SELECT DISTINCT MemberID FROM TrackingQuery) AS M;

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top