I hvae 2 tables(tblSalary and tblDailyExpenses) in tblSalary I have a column PaydAmount that keeps the salary amount paid per employee, and in tblDailyExpenses I have a column Amount that keeps the paid amount per invoice,
I want to return the total paid salary(PaydAmount) and the total amount of paid expenses(Amount) in a month.
I have tried this query.
Select ((select SUM(PaydAmount) from tblSalary where tblSalary.Month=4) AS PaydSalary, (Select SUM(Amount) from tblDailyExpenses where tblDailyExpenses.Month=4) AS PaydExpenses)
I am using Sqlserver Compact edition
where I want to return it in a datagridview as shown below
#| Type | Amount
-------------------------
1| Daily Expenses | 1200
-------------------------
2| Salary Paid | 7800