total | vat rs | discount % |
500 | 5 | 2 |
1000 | 2 | 2 |
1200 | 10 | 5 |
i want my result to be calculated as
(500+5) * 2/100 =a
(1000+2)*2/100=b
(1200+10)*5/100=c
" " " " "
""""""
""
and result = SUM(a+B+C) rs.
this is what i tried
cmd = new SqlCommand("Select (SUM(P_ttotal)+SUM(P_vatto)* (P_totdis)/100) as dis from PRO_BILL", conn);
but it is throwing exception P_totdis is not in group by clause....
help me in this.
any help will be appreciated