[Solved] Whats wrong with my SQL?
Your last query SELECT 0, department, department_name, ”, ‘NP’ as acc_code, ‘NET PROFIT/(LOSS)’ as acc_name,1, SUM((CASE WHEN acc_code=”CS” OR acc_code=”EX” THEN -1*yr_balance ELSE yr_balance END)), SUM((CASE WHEN acc_code=”CS” OR acc_code=”EX” THEN -1*ly_balance ELSE ly_balance END)), SUM((CASE WHEN acc_code=”CS” OR acc_code=”EX” THEN -1*mn_balance ELSE mn_balance END)), SUM((CASE WHEN acc_code=”CS” OR acc_code=”EX” THEN -1*lm_balance ELSE lm_balance END)), … Read more