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 |
usafelix
Posting Yak Master
165 Posts |
Posted - 2014-08-25 : 08:26:22
|
Anyone can give idea that i want this keep query output result but don't want the "compute " this command , because this query cannot run in this dos command directc.exe , Thus, it is have any writing skill , it is possible using of rollup ? select d.shopcode ,d.memono ,d.txdate ,d.sku ,h.depositamt ,p.paymentcode ,p.paymentamt ,d.itemamt ,d.salesqty from xsoheader as h inner join xsodetail as d on d.shopcode=h.shopcode and d.memono=h.memono inner join xsopayment as p on p.shopcode=h.shopcode and p.memono=h.memono where d.sku in ('L000254','L000256') and h.voidflag='N' and d.txdate=convert(varchar(100),getdate(),112) compute sum(p.paymentamt) ,sum(d.salesqty) |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2014-08-25 : 08:48:57
|
GROUP BY GROUPING SETS ((p.paymentamt), (d.salesqty)); Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA |
|
|
usafelix
Posting Yak Master
165 Posts |
Posted - 2014-08-25 : 23:49:48
|
Thanks so much !!!!!!!!!!!! |
|
|
|
|
|
|
|