Monday, January 31, 2011

Query to fetch profile option value at all levels.

/* Formatted on 06/12/2010 13:20:04 (QP5 v5.114.809.3010) */
SELECT DISTINCT
p.profile_option_name SHORT_NAME,
n.user_profile_option_name NAME,
DECODE (v.level_id,
10001, 'Site',
10002, 'Application',
10003, 'Responsibility',
10004, 'User',
10005, 'Server',
'UnDef')
LEVEL_SET,
DECODE (TO_CHAR (v.level_id),
'10001', '',
'10002', app.application_short_name,
'10003', rsp.responsibility_key,
'10005', svr.node_name,
'10006', org.name,
'10004', usr.user_name,
'UnDef')
"CONTEXT",
v.profile_option_value VALUE
FROM fnd_profile_options p,
fnd_profile_option_values v,
fnd_profile_options_tl n,
fnd_user usr,
fnd_application app,
fnd_responsibility rsp,
fnd_nodes svr,
hr_operating_units org
WHERE p.profile_option_id = v.profile_option_id(+)
AND p.profile_option_name = n.profile_option_name
and n.user_profile_option_name = 'ICX: Numeric characters'
--or n.user_profile_option_name like '%Password%Case%')
AND usr.user_id(+) = v.level_value
AND rsp.application_id(+) = v.level_value_application_id
AND rsp.responsibility_id(+) = v.level_value
AND app.application_id(+) = v.level_value
AND svr.node_id(+) = v.level_value
AND org.organization_id(+) = v.level_value
--AND v.profile_option_value LIKE '%PROD%'
AND n.LANGUAGE = 'US'
ORDER BY short_name, level_set

1 comment:

GAMESH TAWADE said...

One of the best product I ve ever purchased from would highly recommend you to go for this product best product to make you laugh and relax thank you so mach.
Read the article