Hi: My organization has just implemented a time tracking database where employees enter information on tasks they do and charge their work to a particular project. My supervisors want a report that will show WHICH employees have not entered ANY hours for a particular time period. I'm trying replicate in crystal the function of the following SQL:
select user_name
from staff
where user_name not in
(select user_name
from staff s, staff_hours sh
where s.staff_id = sh.staff_id and
bill_date >= to_date('02/23/2003','MM/DD/YYYY') and
bill_date <= to_date('03/01/2003','MM/DD/YYYY'))
order by 1
They also want the dates to be parameters. If I put in the selection criteria:
Bill date >= {parameter start day of period} AND Bill date <= {parameter end day of period}, what I get is those people who HAVE entered time for that period.
How do I do show the opposite?
Please please help.
Send replies to cmonaghan@acf.hhs.gov
select user_name
from staff
where user_name not in
(select user_name
from staff s, staff_hours sh
where s.staff_id = sh.staff_id and
bill_date >= to_date('02/23/2003','MM/DD/YYYY') and
bill_date <= to_date('03/01/2003','MM/DD/YYYY'))
order by 1
They also want the dates to be parameters. If I put in the selection criteria:
Bill date >= {parameter start day of period} AND Bill date <= {parameter end day of period}, what I get is those people who HAVE entered time for that period.
How do I do show the opposite?
Please please help.
Send replies to cmonaghan@acf.hhs.gov