Hi all,
I am not sure if spiceworks is the right place to post this, as it's a SQL script issue. Shoot me down if you need to!
I have two tables, Employee and EmployeeHolidayYearsEntitlement. The first table holds details of all employees, whereas the second only shows details of additional holiday entitlement(common relationship is the empid). I need to produce results showing what Employee's in the Employee table do not appear in the EmployeeHolidayYearsEntitlement table.
I created a SELECT that showed all employee's in the EmployeeHolidayYearsEntitlement table(only one so far), and then popped that into another query, see below;
SELECT * FROM EmployeeWHERE NOT EXISTS (select Employee.empid, EmployeeHolidayYearsEntitlement.YearNo from Employee INNER JOIN EmployeeHolidayYearsEntitlement
on Employee.empid =...