| Script |
-- List Request Reassignments
spool c:\requests_to_be_re_assigned_yyyymmdd.txt
set linesize 1000
select nu.username, cr.request_number, crt.request_type_name,
cr.creation_date, cr.description
from KCRT_REQUESTS cr, KNTA_USERS nu, KCRT_REQUEST_TYPES crt
where cr.creation_date >= '1-JAN-2005'
and cr.request_type_id = crt.request_type_id
and cr.assigned_to_user_id = nu.user_id
and (nu.end_date is not null or nu.user_name = "bbaggins" )
and nu.end_date < '17-FEB-2005'
and cr.status_id not in (4,6) /* 4=Cancelled 6=Closed */
spool off
|