Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
hi all,I have a table as below and I try to get out put as second tablecan you help me in writing query for this.select * from invcheque lineno inv_amt taxx 1 100.00 0.00y 3 200.00 0.00x 0 0.00 10.00y 0 0.00 20.00I want out put to be ascheque lineno inv_amt taxx 1 100.00 10.00y 3 200.00 20.00Regard,cse.
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts
Posted - 2009-09-16 : 10:59:21
this?
select cheque,max([lineno]),sum(inv_amt),sum(tax) from invgroup by cheque