sometimes same studentid has 1 or more studentnumbers.
I need to display studentid,studentnumber,sname
when I join I always get multiple rows of same student because the student has more than 1 student number. I want to get only one studentnumber if the student has more. how can i do that. I used distinct keyword but the rows are not actually different.
Julian, I would expect Jeff's example to work and produce different results than distinct. Since the student number is different, the rows aren't exactly the same and distinct wouldn't be able to filter them out.