Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

sql server 2008 alias name calculations

$
0
0

Friends..

I am not able to minus total from demand...

Please correct me where i am making wrong in the below query..

select  
demand=case
when a.graduatetype='F' then (count(s.rollnumber)*12500)
else 0
end,
TotalPaid=sum(sd.PRD_AMOUNT),(demand-totalpaid) as balance
from xxx,xxxxx,xxxx

thanks


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>