I have the following:
I want to select only one Name for each of the distinct ID Values. The following is what I want:
Or something similar.
I have tried "SELECT DISTINCT ID, Name from Table" but it is not working for me, I don't think Group By applies because I am not using aggregate functions. What should I do?
Thanks,
Lumstar
Code:
ID Name
-----------
1 Bob
2 Jimmy
3 Cheryl
1 Susan
3 Michael
I want to select only one Name for each of the distinct ID Values. The following is what I want:
Code:
ID Name
-----------
1 Bob
2 Jimmy
3 Cheryl
I have tried "SELECT DISTINCT ID, Name from Table" but it is not working for me, I don't think Group By applies because I am not using aggregate functions. What should I do?
Thanks,
Lumstar