Page 1 of 1

basic distinct query help..

Posted: Thu Jun 26, 2008 12:18 pm
by Frozenlight777
I have the following query....

Code: Select all

select distinct(system_id_number), system_name, net_user_name from system where system_model LIKE '%2cu%' order by system_name
I keep getting multiple system_id_numbers of the same values. I'm either using distinct incorrectly or there's another method. How can I assure that each system_id_number is unique?

Danke

Re: basic distinct query help..

Posted: Thu Jun 26, 2008 12:32 pm
by Christopher
It is doing DISTINCT on all of the fields as a group. Look at GROUP BY instead. They are confusingly similar....