This SQL query selects request IDs, names, argument texts, and user names from various tables in an apps database where the phase code is 'P', the requested start date is after the current date, and the language is 'US'. It only selects rows where the user name is 'SYSADMIN' or 'OPERATIONS'. It further filters the results to only include rows that have duplicate names, argument texts, and user names. The results are ordered by user name, name, and argument text.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
261 views1 page
Duplicate Schedule Check of Concurrent Programs
This SQL query selects request IDs, names, argument texts, and user names from various tables in an apps database where the phase code is 'P', the requested start date is after the current date, and the language is 'US'. It only selects rows where the user name is 'SYSADMIN' or 'OPERATIONS'. It further filters the results to only include rows that have duplicate names, argument texts, and user names. The results are ordered by user name, name, and argument text.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1
SELECT request_id, NAME, argument_text, user_name
FROM (SELECT cr.request_id, DECODE (cp.user_concurrent_program_name,
'Report Set', 'Report Set:' || cr.description, cp.user_concurrent_program_name ) NAME, argument_text, fu.user_name FROM apps.fnd_concurrent_programs_tl cp, apps.fnd_concurrent_requests cr, apps.f nd_user fu WHERE cp.application_id = cr.program_application_id AND cp.concurrent_program_id = cr.concurrent_program_id AND cr.requested_by = fu.user_id AND cr.phase_code = 'P' AND cr.requested_start_date > SYSDATE AND cp.LANGUAGE = 'US' AND fu.user_name in ('SYSADMIN','OPERATIONS')) t1 WHERE EXISTS ( SELECT 1 FROM (SELECT cr.request_id, DECODE (cp.user_concurrent_program_name, 'Report Set ', 'Report Set:' || cr.description, cp.user_concurrent_program_name) NAME, argument_text, fu.user _name FROM apps.fnd_concurrent_programs_tl cp, apps.fnd_concurrent_requests cr, apps.f nd_user fu WHERE cp.application_id = cr.program_application_id AND cp.concurrent_program_id = cr.concurrent_program_id AND cr.requested_by = fu.user_id AND cr.phase_code = 'P' AND cr.requested_start_date > SYSDATE AND cp.LANGUAGE = 'US' AND fu.user_name in ('SYSADMIN','OPERATIONS')) t2 WHERE t1.NAME = t2.NAME AND t1.argument_text = t2.argument_text AND t1.user_name = t2.user_name GROUP BY NAME, argument_text, user_name HAVING COUNT (*) > 1) ORDER BY 4,2,3