I need help. I am trying to get the salary and taxable allowances of an employee from the 2 tables, one holds the employee salary and the other his allowance.
The 2 tables share a common column that is the EmpID
.
My code only returns a result for the employees that have a taxable allowance.
This is what I have tried:
select
Employee.EmpID, amount as Allw, bSalary
from
Employee
left join
EmployeeAllowance on (Employee.EmpID = EmployeeAllowance.EmpID)
where
taxStatus = 1
and Employee.EmpID = 'PC899'