Author |
Topic |
myharshdesigner
Starting Member
5 Posts |
Posted - 2007-09-17 : 04:04:59
|
i want to use Group bybut i also wan to display all the rows which is presented in the database.And at the end of a group i want to display Some of all The rows in a group.like i have 10 rows in a database and there is a three groupin 1st group there is 5 rows.in 2nd group there is 2 rows.andin 3rd group there is 3 rows.so i just want to display the sum of all amount in a group.so pl tell me what query i suppose to use for getting what i want .waiting for some helpwith examplethanks |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-17 : 04:18:43
|
1 You should do this in Reports2 Read about ROLLUP operator in sql server help fileMadhivananFailing to plan is Planning to fail |
 |
|
myharshdesigner
Starting Member
5 Posts |
Posted - 2007-09-17 : 04:20:18
|
what is Reports And What is Rollup and how to use it can you give me some example ? plquote: Originally posted by madhivanan 1 You should do this in Reports2 Read about ROLLUP operator in sql server help fileMadhivananFailing to plan is Planning to fail
|
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-17 : 04:21:26
|
<<i also wan to display all the rows which is presented in the database.>>Where do you want to display data?MadhivananFailing to plan is Planning to fail |
 |
|
myharshdesigner
Starting Member
5 Posts |
Posted - 2007-09-17 : 04:25:34
|
in a table on the same page.........quote: Originally posted by madhivanan <<i also wan to display all the rows which is presented in the database.>>Where do you want to display data?MadhivananFailing to plan is Planning to fail
|
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-17 : 04:28:59
|
<<in a table on the same page.........>>What do you mean by page?Query Analyser, Reporting tool's page, webpage, etc???MadhivananFailing to plan is Planning to fail |
 |
|
myharshdesigner
Starting Member
5 Posts |
Posted - 2007-09-17 : 04:33:12
|
oo sorryi will test in the Query Analyser if it will work fine then i will use it on Web page..So tel me only for Query Analyser.Thanks.quote: Originally posted by madhivanan <<in a table on the same page.........>>What do you mean by page?Query Analyser, Reporting tool's page, webpage, etc???MadhivananFailing to plan is Planning to fail
|
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-17 : 04:36:56
|
Note that you can generate group total in a webpage when you loop thru all the records there(You need to reset the total whenever group changes). Try it over there. There is no need to generate this in a query and then send data to a webpageMadhivananFailing to plan is Planning to fail |
 |
|
myharshdesigner
Starting Member
5 Posts |
Posted - 2007-09-17 : 04:39:22
|
i think this will be done automatically by sql queary then we just only have to display the result in a web page.there is something like group by or some group..??????quote: Originally posted by madhivanan Note that you can generate group total in a webpage when you loop thru all the records there(You need to reset the total whenever group changes). Try it over there. There is no need to generate this in a query and then send data to a webpageMadhivananFailing to plan is Planning to fail
|
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-09-17 : 04:59:34
|
Post sample and accurate sample data together with your expected result of the magic query. E 12°55'05.25"N 56°04'39.16" |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-17 : 05:00:34
|
<<i think this will be done automatically by sql queary then we just only have to display the result in a web page.>>Well. You should know how to generate groupwise total at webpageIf you want to generate this in query analyser, as I told you, read about ROLLUP operator in sql server help file. If you dont have help file, do google search for the sameMadhivananFailing to plan is Planning to fail |
 |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-09-17 : 09:44:49
|
queary = query + weary? elsasoft.org |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-17 : 10:16:54
|
quote: Originally posted by jezemine queary = query + weary? elsasoft.org
Yes it is MadhivananFailing to plan is Planning to fail |
 |
|
|