--To find the start/end date of a fnd_user and its responsibilities.
--To be run as apps user
set pagesize 100
set linesize 80
set echo off
set feedback on
set verify off
col user_name format a15 truncated
col responsibility_name format a30 truncated
col usrupdby format a15 truncated
col respupdby format a15 truncated
col user_id format 999999
col responsibility_id format 999999 heading 'Resp ID'
define fnduser=&&1
select u.user_name, u.start_date, u.end_date, r.responsibility_name,
r.responsibility_id, u.user_id, ur.start_date, ur.end_date,
u.last_update_date usrupddate, fu.user_name usrupdby,
ur.last_update_date respupddate, fr.user_name respupdby
from fnd_user u, fnd_user_responsibility ur, fnd_responsibility r, fnd_user fu,
fnd_user fr
where u.user_id = ur.user_id
and fu.user_id = u.last_updated_by
and fr.user_id = ur.last_updated_by
and ur.responsibility_id = r.responsibility_id
and u.user_name = '&fnduser'
/