Sei sulla pagina 1di 2

SELECT -- count(distinct fu.

user_name) "total_user",
distinct fu.user_name,
FU.DESCRIPTION --,
--FAT.APPLICATION_NAME

FROM
fnd_user_resp_groups_direct furg,
applsys.fnd_user fu,
applsys.fnd_responsibility_tl frt,
applsys.fnd_responsibility fr,
applsys.fnd_application_tl fat,
applsys.fnd_application fa

WHERE furg.user_id = fu.user_id


AND furg.responsibility_id = frt.responsibility_id
AND fr.responsibility_id = frt.responsibility_id
and fa.application_id = fat.application_id
AND fr.application_id = fat.application_id
AND FU.END_DATE IS NULL
and FURG.END_DATE is null
and FAT.APPLICATION_NAME = 'E-Business Tax'
--and upper(frt.responsibility_name) like upper('%Pricing%')
and FU.DESCRIPTION in ('IT','IT Vendor','SSC','EHS','EES','EDL-S','EDL-
D','EMS' ,'CORP','BE-PHONE','EBHAR','EBHAR-KENYA' ,'EBHAR-MOROCCO',
'EMSP','WIKO','SSC-CONTRACT_STAFF','EMSP-Intern','SSC-Intern')
--and FU.DESCRIPTION in ('SSC')

--group by
-- FU.DESCRIPTION --,FAT.APPLICATION_NAME

union

SELECT --count(distinct fu.user_name) "total_user",


distinct fu.user_name,
FU.DESCRIPTION --,
--FAT.APPLICATION_NAME

FROM
fnd_user_resp_groups_direct furg,
applsys.fnd_user fu,
applsys.fnd_responsibility_tl frt,
applsys.fnd_responsibility fr,
applsys.fnd_application_tl fat,
applsys.fnd_application fa

WHERE furg.user_id = fu.user_id


AND furg.responsibility_id = frt.responsibility_id
AND fr.responsibility_id = frt.responsibility_id
and fa.application_id = fat.application_id
AND fr.application_id = fat.application_id
AND FU.END_DATE IS NULL
and FURG.END_DATE is null
and FAT.APPLICATION_NAME = 'Financials Common Modules'
--and upper(frt.responsibility_name) like upper('%Pricing%')
and FU.DESCRIPTION in ('IT','IT Vendor','SSC','EHS','EES','EDL-S','EDL-
D','EMS' ,'CORP','BE-PHONE','EBHAR','EBHAR-KENYA' ,'EBHAR-MOROCCO',
'EMSP','WIKO','SSC-CONTRACT_STAFF','EMSP-Intern','SSC-Intern')
--and FU.DESCRIPTION in ('SSC')

--group by
-- FU.DESCRIPTION --,FAT.APPLICATION_NAME

union

SELECT --count(distinct fu.user_name) "total_user",


distinct fu.user_name,
FU.DESCRIPTION --,
-- FAT.APPLICATION_NAME

FROM
fnd_user_resp_groups_direct furg,
applsys.fnd_user fu,
applsys.fnd_responsibility_tl frt,
applsys.fnd_responsibility fr,
applsys.fnd_application_tl fat,
applsys.fnd_application fa

WHERE furg.user_id = fu.user_id


AND furg.responsibility_id = frt.responsibility_id
AND fr.responsibility_id = frt.responsibility_id
and fa.application_id = fat.application_id
AND fr.application_id = fat.application_id
AND FU.END_DATE IS NULL
and FURG.END_DATE is null
and FAT.APPLICATION_NAME = 'General Ledger'
--and upper(frt.responsibility_name) like upper('%Pricing%')
and FU.DESCRIPTION in ('IT','IT Vendor','SSC','EHS','EES','EDL-S','EDL-
D','EMS' ,'CORP','BE-PHONE','EBHAR','EBHAR-KENYA' ,'EBHAR-MOROCCO',
'EMSP','WIKO','SSC-CONTRACT_STAFF','EMSP-Intern','SSC-Intern')
--and FU.DESCRIPTION in ('SSC')

--group by
--FU.DESCRIPTION --,FAT.APPLICATION_NAME

Potrebbero piacerti anche