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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL to get where IN ALL

Author  Topic 

kprasadreddy
Starting Member

41 Posts

Posted - 2004-09-01 : 13:07:09
I need a query that can get count(STDNT_NB) from Scores table where the students completed all the courses from Course table

Thanks,

Prasad

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-09-01 : 13:10:51
yeah, and we're supposed to imagine everything???

give us more info, create table, insert into statement and desired result.
5-10 rows will suffice.

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

kprasadreddy
Starting Member

41 Posts

Posted - 2004-09-01 : 13:14:23
I have courses with course numbers 274,345,347,355,900,9001 and I want to get the number of students in zldt180_scr table that have completed all the above courses..

I hope this helps

Thanks,

Prasad
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-09-01 : 13:31:04
how are the tables joined togehter??
show us the table design so we know how to connect them...

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-01 : 13:33:37
Is this a homework question?

Tara
Go to Top of Page

kprasadreddy
Starting Member

41 Posts

Posted - 2004-09-01 : 13:45:51
Both the tables are not joined....
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-09-01 : 13:49:39
then use something like:

select ...
where course in (274,345,347,355,900,9001)

as tara said, is this a homework???

Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

kprasadreddy
Starting Member

41 Posts

Posted - 2004-09-01 : 14:19:24
It's not a homework question.Can anyone help.

Thanks,

Prasad
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-01 : 14:21:38
You haven't provided the create table statements for your tables. We need to see that in order to help.

Tara
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-09-01 : 15:19:34
We've already been through this...

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=38807

Corey
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-01 : 15:34:35
I guess he didn't like the answer. Still hasn't posted the create table statements.

Tara
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-09-01 : 15:36:44
maybe he will this time...?

Corey
Go to Top of Page
   

- Advertisement -