237: psb_entity_set e,
238: psb_entity_assignment f
239: WHERE EXISTS
240: (SELECT 1
241: FROM PSB_DEFAULT_ACCOUNT_DISTRS d
242: WHERE d.default_rule_id = a.default_rule_id)
243: AND a.default_rule_id = b.default_rule_id
244: AND b.account_position_set_id = c.account_position_set_id
245: AND c.data_extract_id = p_data_extract_id
257: FROM psb_defaults a,
258: psb_entity_set b,
259: psb_entity_assignment c
260: WHERE EXISTS (SELECT 1
261: FROM PSB_DEFAULT_ACCOUNT_DISTRS d
262: WHERE d.default_rule_id = a.default_rule_id)
263: AND a.global_default_flag = 'Y'
264: AND a.data_extract_id = p_data_extract_id
265: AND b.entity_set_id = c.entity_set_id
273: SELECT 'Exists'
274: FROM dual
275: WHERE EXISTS
276: (SELECT 1
277: FROM PSB_DEFAULT_ACCOUNT_DISTRS a,
278: PSB_DEFAULTS b
279: WHERE a.default_rule_id = b.default_rule_id
280: AND b.global_default_flag = 'Y'
281: AND b.data_extract_id = p_data_extract_id
285: CURSOR c_Dist IS
286: SELECT chart_of_accounts_id,
287: code_combination_id,
288: distribution_percent
289: FROM PSB_DEFAULT_ACCOUNT_DISTRS
290: WHERE default_rule_id = l_default_rule_id;
291:
292: CURSOR l_distribution_id_csr
293: IS