Nov 08, 2010 05:47 PM|worldspawn|LINK
So when i join both the tables with EmpID i get only the employees who are present in both the tables. But i want all the employee from employee table irrespective of their phone. If an employee is not in the phone table, i need to display 0 / null in the phone
number number field. This is the requirement.
Yes as I said because you have p.PhTypID == 1 you will never receive matches where p.PhTypId is null. You need to write something like: where (p.PhTypID == 1 || p == null)
Another bizarre thing is this:
EmpId = p == null ? 0 : e.EmpID,
Why use an EmpId of zero if p (the phone) is null? e.EmpId is always available..