Monday, August 10, 2020

AME Related Useful SQL Queries

/*GET AME Trx Type's Rules, conditions*/ select apl.APPLICATION_NAME Transaction_type, r.description Rule,r.rule_id,r.start_date,r.end_date ,condition Conditions from (select distinct rule_id, description,start_date,end_date from ame_rules where sysdate between start_date and end_date) r, (select distinct rule_id, LISTAGG (ame_utility_pkg.get_condition_description (acu.condition_id), chr(10)) WITHIN GROUP (order by acu.condition_id) OVER (partition by acu.rule_id) condition from ame_condition_usages acu) cu, ame_rule_usages aru, (select APPLICATION_NAME, application_id from ame_calling_apps_vl acav where application_name = 'Payables Invoice Approval' and rownum = 1) apl where r.rule_id = cu.rule_id --and r.rule_id = 20004 and aru.rule_id = r.rule_id and aru.item_id = apl.application_id order by r.description

No comments:

Post a Comment