Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
cipriani1984
Constraint Violating Yak Guru
304 Posts |
Posted - 2009-02-25 : 05:20:34
|
Hi,I have the following data.student_id, comp_status001, 1001, 2002, 2003, 2003, 2The data above is a list of students who have enrolled onto an institute and the reason there are multiple rows for one student is because they study more than one course. Is there a way I can return list of students who just dont have one at all. Because if i do comp_status <> 1 then itll still bring back student 001 which I dont want to see.Thanks. |
|
cipriani1984
Constraint Violating Yak Guru
304 Posts |
Posted - 2009-02-25 : 06:44:12
|
Ive found solution now. thanks anyways |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-02-25 : 07:03:56
|
SELECT student_id from table1 group by student_idhaving min(comp_status) > 1 E 12°55'05.63"N 56°04'39.26" |
 |
|
|
|
|