crystalnewbie
MIS
I have this sql query that I'm trying to convert into a cr8.5 report. I'd like to learn how it can be done without pasting the sql query directly into the sql editor. Need assistance on getting started though.
The sql basically looks for employees that doesn't have a transaction record in the table since 21 days from the current date.
select empID, max(eventdate) from mytable
where empID in
(
select distinct empID
from mytable
group by empID
having max(eventdate) < getdate()-21
)
group by empID
order by max(eventdate)
The sql basically looks for employees that doesn't have a transaction record in the table since 21 days from the current date.
select empID, max(eventdate) from mytable
where empID in
(
select distinct empID
from mytable
group by empID
having max(eventdate) < getdate()-21
)
group by empID
order by max(eventdate)