nriddock
asked on
employee exception report in SQL
im trying to create a query/report that will generate a report detailing all the employees who forgot to enter their time on friday
my thought was ...
<pseduocode>
"select * from tracking table where hours IS NULL and (TrackDate >= '04/06/2009') AND (TrackDate <= '04/10/2009')"
</pseduocode>
but if they didnt enter any data then there is no record of them anyway.
how do i need to construct my logic to get the data i need?
two queries : one that says who DID enter time and then compare a list of the total employees
any assistance is appreciated.
thx
my thought was ...
<pseduocode>
"select * from tracking table where hours IS NULL and (TrackDate >= '04/06/2009') AND (TrackDate <= '04/10/2009')"
</pseduocode>
but if they didnt enter any data then there is no record of them anyway.
how do i need to construct my logic to get the data i need?
two queries : one that says who DID enter time and then compare a list of the total employees
any assistance is appreciated.
thx
ASKER
emp table - yes
so....
select * from EmpTable, TrackingTable
where EmpTable.EmpID = TrackingTable.EmpID
(INSERT SUBQUERY HERE?)
suggestions?
so....
select * from EmpTable, TrackingTable
where EmpTable.EmpID = TrackingTable.EmpID
(INSERT SUBQUERY HERE?)
suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If so, you can run a correlated subquery checking the employee id table and then checking the tracking tbale where the emplyeed ID not exist.