Microsoft
Software
Hardware
Network
Question : Query Help
SELECT BALANCEAMOUNT FROM MONTHLYBILL
WHERE TRANSMONTH='MAY-2010'
AND MEMBERACCNO='B-100'
SELECT RECEIPTAMOUNT FROM MONTHLYBILL
WHERE TRANSMONTH='JUNE-2010'
AND MEMBERACCNO='B-100'
SELECT RECEIPTAMOUNT FROM MONTHLYBILL
WHERE TRANSMONTH='JULY-2010'
AND MEMBERACCNO='B-100'
Hi Need help to rewrite the above query to return result as follows
The ouput should be balanceamount (which is from monthy of may 2010)
-
sum(receiptamount) (which is from month of june july)
Answer : Query Help
SELECT
SUM(CASE WHEN TRANSMONTH='MAY-2010' THEN BALANCEAMOUNT END)
-SUM(CASE WHEN TRANSMONTH<>'MAY-2010' THEN RECEIPTAMOUNT END)
FROM MONTHLYBILL A
WHERE TRANSMONTH IN ('MAY-2010','JUNE-2010','J
ULY-2010')
AND MEMBERACCNO='B-100'
Random Solutions
Excel 2007 -- Conditional Formatting
Does Win 2008 R2 Remote Desktop allow users with limited rights and access
eCommerce in .NET
VMWare Workstation & Virus?
looping array makes array not empty, even though reset applied at start of loop
Accessing FTP server via external IP only?!
how to implement the screen which can be in form of grid lines in swings
javascrip string parsing question
Cancel AutoPlay in Windows (XP and after) with C++
Database Synchronization