I'm using Delphi 2010 & MySQL in an application, I am facing a problem to calculate the sum of Services Debit Side, and the payment at credit side in one table, I'd like to get the Balance sheet. according to the Sum(Credit)-Sum(Debit).
IF (Sum(Credit)>Sum(Debit) , Sum(Credit)-Sum(Debit), 0) as creditBalance
IF (Sum(Debit>Sum(Credit), , Sum(Debit)-Sum(Credit), 0) as DebitBalance queryif.png
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.