I have a database, I need to run a report on employees who are on holiday at a specified date.
The report works great, and is picking up everyone who is on holiday on a specified date...
the problem I have, is that holidays are entered in advance, and when someone leaves the company, they are still showing up in the report.... I could exclude them in the query, but that would affect the results when they were an employee and had a holiday... soo..
my employee table has a field named employee_status, and status 1 is live, 3 is leaver
I also have a field in employees table for leaving date, this is either 01/01/1900 if the employee is live or the leaving date if they left.
so... how can I incorporate into the query that information, so that the query will show any holidays for any employee when they are 'live'?