Its me again... below is my simple query. How can I make the 'balance' column to be the running balance of Debit less Credit column?
SELECT T0.[TransId], T0.[RefDate],T1.[ShortName], T1.[Debit], T1.[Credit], T1.[Debit]- T1.[Credit] as 'Balance' FROM OJDT T0 INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId WHERE T1.[ShortName] = '10301' and T1.[ProfitCode] = [%0] and T0.[RefDate] between '[%1]' and '[%2]'
Thanks and looking forward for your feedback.