> How can I return rows without duplicates defined only by a single column?
>
> For example, I want to return rows that have no repeats of a certain
column.
>
> If I use
>
> Select DISTINCT UserID from Member
>
> it works -- but I want to return more columns ...
>
> So when I go
>
> Select Distinct UserID, UserName from Member
>
> I don't get the filtering of repeat UserIDs that I need.
>
> MAke sense? Anyone know the syntax I need??

No it doesn't make sense really. If you have more than one UserName for each
UserID, which I assume you do - otherwise the filtering would still be
working - then if you want a full list of UserNames you're bound to get
repeated UserID's.

If you want a list of all UserID's that only have one UserName you could say

SELECT UserID, count(UserName) FROM Member
GROUP BY UserID
HAVING count(UserName) =  0

but I'm not sure that's what you want... is it?

Nick de Voil
De Voil Consulting
[EMAIL PROTECTED]
Tel      +44 20 8560 4373



------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to