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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Newbie help

Author  Topic 

newbie2006
Starting Member

7 Posts

Posted - 2006-06-24 : 02:47:02
Hi i have 2 columns in the same table.....one column retrieves all registered students, the other column retrieved registered students but who have not completed a required survey.

The 2 sql statements are almost the same except that the 2nd one does another comparison at another table....(i.e. where student_id not in (select student_id from other_t).

I am trying to combine the 2 sql statements into a derived table where results will be displayed as follows:

registered students | students(incomplete surveys)


studA, studB, studC | studB
studC, studD, studE | studD, studE

is there any way to do it?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-06-24 : 07:15:21
This should help http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=56058


KH

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-26 : 01:40:43
Also refer http://sqljunkies.com/WebLog/amachanic/archive/2004/11/10/5065.aspx?Pending=true

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -