I have a database that holds information about the location of our members. Their location is held as an ID that it gets from another table in the databse.
Is there an SQL SELECT query I can write that will return a result listing the ID and the number of times it appears? I am sure this is rather simple but I just am unaware of the code?
thanks.Assuming that you are using SQL, you could use the GROUP BY clause to do what you've described.
What tool(s) are you using, and what is your table design?
-PatP|||I am using MS Access. The table has fields holding member data. All items that will potentially be repeated ie gender, location, member package, member category, etc are populated with a unique ID referencing another table containing the data that is pertinent to those. All the IDs are held in number fields.
I assume that is the info you were after?|||yes, Access supports COUNT(*) and GROUP BYselect ID,count(*) as rows from sometable group by ID
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment