Link to home
Start Free TrialLog in
Avatar of nriddock
nriddockFlag for United States of America

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



Avatar of tl121000
tl121000
Flag of United States of America image

Do you have an employee table?
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.
 
 
 
Avatar of nriddock

ASKER

emp table - yes

so....

select * from EmpTable, TrackingTable

where EmpTable.EmpID = TrackingTable.EmpID

(INSERT SUBQUERY HERE?)


suggestions?
ASKER CERTIFIED SOLUTION
Avatar of reb73
reb73
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial