<cfquery name="GetUsers" datasource="user020"> SELECT u.userID, u.firstName, u.lastName, e.eventID, e.userID FROM tbl_020publicUsers u, tbl_020eventDetails e WHERE u.userID = e.userID </cfquery>
By selecting e.eventID from the tbl_020eventDetails e table, every row selected is going to be distinct. A couple of thing you can do, is not select the data from the eventDetails table, then the DISTINCT command should work as you desired. Or you some aggregate functions. <cfquery name="GetUsers" datasource="user020"> SELECT u.userID, u.firstName, u.lastName, SUM(e.eventID), SUM(e.userID) FROM tbl_020publicUsers u, tbl_020eventDetails e WHERE u.userID = e.userID GROUP BY u.userID, u.firstName, u.lastName </cfquery> This will return all the users that have records in the details table with a count of how many records they have. -------------- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222923 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

