409: resultout out nocopy varchar2 ) is
410:
411: cursor c1(p_account varchar2) is
412: select 'T'
413: from FND_USER
414: where
415: FND_USER.USER_NAME=p_account
416: and FND_USER.EMPLOYEE_ID is NULL
417: and trunc(sysdate) between trunc(start_date) and nvl(end_date,sysdate)
411: cursor c1(p_account varchar2) is
412: select 'T'
413: from FND_USER
414: where
415: FND_USER.USER_NAME=p_account
416: and FND_USER.EMPLOYEE_ID is NULL
417: and trunc(sysdate) between trunc(start_date) and nvl(end_date,sysdate)
418: union all
419: select 'T'
412: select 'T'
413: from FND_USER
414: where
415: FND_USER.USER_NAME=p_account
416: and FND_USER.EMPLOYEE_ID is NULL
417: and trunc(sysdate) between trunc(start_date) and nvl(end_date,sysdate)
418: union all
419: select 'T'
420: from FND_USER USR, PER_PEOPLE_F PER
416: and FND_USER.EMPLOYEE_ID is NULL
417: and trunc(sysdate) between trunc(start_date) and nvl(end_date,sysdate)
418: union all
419: select 'T'
420: from FND_USER USR, PER_PEOPLE_F PER
421: where USR.USER_NAME=p_account
422: and trunc(sysdate) between trunc(USR.start_date) and nvl(USR.end_date,sysdate)
423: and USR.EMPLOYEE_ID = PER.PERSON_ID
424: and trunc(sysdate) between trunc(per.effective_start_date) and nvl(per.effective_end_date,sysdate)
998: USR.USER_NAME name,
999: PER.FULL_NAME display_name
1000: from
1001: PER_PEOPLE_F PER,
1002: FND_USER USR
1003: where trunc(SYSDATE) between PER.EFFECTIVE_START_DATE
1004: and PER.EFFECTIVE_END_DATE
1005: and PER.PERSON_ID = USR.EMPLOYEE_ID
1006: and USR.USER_ID = P_USER_ID
1010: and orig_system_id=P_USER_ID)
1011: -- replaced to boost perf
1012: */
1013: select user_name name,user_name display_name
1014: from fnd_user
1015: where user_id=P_USER_ID
1016: and employee_id is null
1017: union all
1018: select
1018: select
1019: USR.USER_NAME name, PER.FULL_NAME display_name
1020: from
1021: PER_PEOPLE_F PER,
1022: FND_USER USR
1023: where trunc(SYSDATE)
1024: between PER.EFFECTIVE_START_DATE and PER.EFFECTIVE_END_DATE
1025: and PER.PERSON_ID = USR.EMPLOYEE_ID
1026: and USR.USER_ID = P_USER_ID