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 |
Swati Jain
Posting Yak Master
139 Posts |
Posted - 2007-10-31 : 06:47:47
|
select Sum(TotalValue) as GrandTotalValue,Sum(Rvalue) as GrandRValue,Sum(QRvalue)as InvoiceValuefrom @Resultgroup by TotalValue, Rvalue,QRvalue Where TotalValue, Rvalue,QRvalue are columns of temprory table for which values are calculated with cursorBut I dont get the Sum as given in above query rather i get separate rows.How to resolve the issue? |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-31 : 06:55:28
|
quote: Originally posted by Swati Jain select Sum(TotalValue) as GrandTotalValue,Sum(Rvalue) as GrandRValue,Sum(QRvalue)as InvoiceValuefrom @Resultgroup by TotalValue, Rvalue,QRvalue Where TotalValue, Rvalue,QRvalue are columns of temprory table for which values are calculated with cursorBut I dont get the Sum as given in above query rather i get separate rows.How to resolve the issue?
Then dont use Group by clauseMadhivananFailing to plan is Planning to fail |
|
|
|
|
|