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 |
|
anruagsingh02
Starting Member
3 Posts |
Posted - 2006-10-18 : 08:27:19
|
| i have to find a row where the sum of one col exceeds a specified quantity... say there is one table classoom where there is weight col..now i want to find a row where the sum of the weight col exceeds 1000 kgs-anurag |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-10-18 : 08:29:23
|
| Somthing like this Select * from tablename where weight > 1000Chiraghttp://chirikworld.blogspot.com/ |
 |
|
|
anruagsingh02
Starting Member
3 Posts |
Posted - 2006-10-18 : 08:32:10
|
| no dude that will give me rows where the weight is greater then 1000 but my question is that i want that row where the cumulative weight of all the rows above that row exceeds 1000-anurag |
 |
|
|
anruagsingh02
Starting Member
3 Posts |
Posted - 2006-10-18 : 08:39:02
|
| one solution is using a while loop but i need a more refined way .. possibly in one shot-anurag |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
|
|
|
|
|