Groups | Blog | Home
all groups > sql server programming > november 2005 >

sql server programming : hi


ML
11/29/2005 12:52:03 PM
Google for "relational division". A while back I posted a function in this
group based on an Article on relational division by Joe Celko.

If everything else fails, let me know - maybe I still have it somewhere. But
then again, the examples in Celko's article will help a lot:
http://www.dbazine.com/ofinterest/oi-articles/celko1


Anith Sen
11/29/2005 1:21:58 PM
Based on your narrative, it sounds like it can be handled in a single query.
But without details on table structures, sample data & expected results,
others can only guess ( for details see: www.aspfaq.com/5006 )

--
Anith

Lara
11/29/2005 9:51:22 PM
Hi,

I have a StudentMark table (StudentID int , SubjectID int, Mark int,
Semester tinyint)
The pass criteria for each student is given as follow

1. He should pass in all the 6 subjects (pass mark = 40)
2. Condition 1 +
1. Avg of any 4 subjects is 40% + Avg any 3 70%
or
2. Avg of any 5 subjects is 50% + avg of any 2 is 80%

or
3. Avg of all the subjects is 60%


can i do it in a single Query ? I had done it using table vars?


Thanks in Advance

Lara

AddThis Social Bookmark Button