I am generating a report from 3 tables respectively Income, Expence and Transactions.
table structure is as below:
Income:
Hi I am developing an application in VS 2010, C# and SQLCe database.
Expence:
Transactions:
For this I wrote query
select t.tDate as [Date], t.tDescription as [Detail],e.eAmount as [Debit],
i.iAmount as [Credit], t.balance as [Balance] from Transactions t
inner join Expence e on t.pid=e.pid join Income i on t.pid=i.pid where t.pid='11'
But when I run this query I am just getting
I want that my result should be like a bank statement as below.
How can we write query to get result like this?