My Employee Table
EMPLOYEEID, EMPLOYEENAME
My CallReportEmployee Table
ReportID, EMPLOYEEID
My Report Table
ReportID , ReportName
When I want to get is I want to show all the employee name, when those didnt choose ReportID 1
1 report can consist of many employees
How can I such outcome is I want to list out all the Employee with ReportID one and not 1?
EMPLOYEENAME REPORTID
Roger 1
Peter 1
Shawn NULL
Peter NULL
I try this, it didn't work
SELECT rc.EmployeeID, rc.ReportID, e.FirstName
FROM employee e
LEFT JOIN callreportemployee rc ON e.ID = rc.EmployeeID
it just show all the employee
EMPLOYEENAME REPORTID
Roger Null
Peter 1
Peter 2
Shawn 3
Shawn 2
John NULL
if i add in in a where rc.ReportID = 1
it become show Peter only
How can I achieve the format I want? I don't want duplicate Name