Mar 27, 2006 #1 DarVar Programmer Mar 14, 2006 10 IE I have a table with three coluumns id|name|label Given the label I want an sql statement to find distinct names with the same label Thanks in advance.
I have a table with three coluumns id|name|label Given the label I want an sql statement to find distinct names with the same label Thanks in advance.
Mar 27, 2006 #2 PHV MIS Nov 8, 2002 53,708 FR Something like this ? SELECT DISTINCT name FROM yourTable WHERE label = 'yourLabel' Or this ? SELECT label, name FROM yourTable GROUP BY label, name Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
Something like this ? SELECT DISTINCT name FROM yourTable WHERE label = 'yourLabel' Or this ? SELECT label, name FROM yourTable GROUP BY label, name Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886