SELECT * FROM ( SELECT gl.name , ROLE.role_name , pu.username FROM fusion.fun_user_role_data_asgnmnts ROLE , fusion.gl_access_sets gl , fusion.per_users pu WHERE gl.access_set_id = ROLE.access_set_id AND pu.user_guid = ROLE.user_guid UNION SELECT bu.bu_name , ROLE.role_name , pu.username FROM fusion.fun_all_business_units_v bu , fusion.fun_user_role_data_asgnmnts ROLE , fusion.per_users pu WHERE ROLE.org_id = bu.bu_id AND pu.user_guid = ROLE.user_guid UNION SELECT led.name , ROLE.role_name , pu.username FROM fusion.gl_ledgers led , fusion.fun_user_role_data_asgnmnts ROLE , fusion.per_users pu WHERE ROLE.ledger_id = led.ledger_id AND pu.user_guid = ROLE.user_guid UNION SELECT book.book_type_name , ROLE.role_name , pu.username FROM fusion.fun_user_role_data_asgnmnts ROLE , fusion.fa_book_controls book , fusion.per_users pu WHERE book.book_control_id = ROLE.book_id AND pu.user_guid = ROLE.user_guid UNION SELECT interco.interco_org_name , ROLE.role_name , pu.username FROM fusion.fun_user_role_data_asgnmnts ROLE , fusion.fun_interco_organizations interco , fusion.per_users pu WHERE interco.interco_org_id= ROLE.interco_org_id AND pu.user_guid = ROLE.user_guid UNION SELECT cost.cost_org_name , ROLE.role_name , pu.username FROM fusion.fun_user_role_data_asgnmnts ROLE , fusion.cst_cost_orgs_v cost , fusion.per_users pu WHERE cost.cost_org_id = ROLE.cst_organization_id AND pu.user_guid = ROLE.user_guid UNION SELECT mfg.def_supply_subinv , ROLE.role_name , pu.username FROM fusion.fun_user_role_data_asgnmnts ROLE , fusion.rcs_mfg_parameters mfg , fusion.per_users pu WHERE mfg.organization_id= ROLE.mfg_organization_id AND pu.user_guid = ROLE.user_guid UNION SELECT budget.name , ROLE.role_name , pu.username FROM fusion.fun_user_role_data_asgnmnts ROLE , fusion.xcc_control_budgets budget , fusion.per_users pu WHERE budget.control_budget_id = ROLE.control_budget_id AND pu.user_guid = ROLE.user_guid UNION SELECT st.set_name , ROLE.role_name , pu.username FROM fusion.fun_user_role_data_asgnmnts ROLE , fusion.fnd_setid_sets_vl st , fusion.per_users pu WHERE st.set_id = ROLE.set_id AND pu.user_guid = ROLE.user_guid UNION SELECT inv.organization_code , ROLE.role_name , pu.username FROM fusion.fun_user_role_data_asgnmnts ROLE , fusion.inv_org_parameters inv , fusion.per_users pu WHERE inv.organization_id = ROLE.inv_organization_id AND pu.user_guid = ROLE.user_guid UNION SELECT hr.classification_code , ROLE.role_name , pu.username FROM fusion.fun_user_role_data_asgnmnts ROLE , fusion.hr_org_unit_classifications_f hr , fusion.per_users pu WHERE hr.org_unit_classification_id = ROLE.org_id AND pu.user_guid = ROLE.user_guid ) WHERE 1 = 1 AND username IN ('shailender@OracleAppsDNA.com' ,'rahul@OracleAppsDNA.com') AND role_name LIKE 'ORA_AR_ACCOUNTS_RECEIVABLE%' AND name LIKE 'Enterp%' ORDER BY username, role_name |