347: -- order by table_name desc;
348: --
349: cursor scl is
350: select rule_mode
351: from pay_legislation_rules
352: where legislation_code = P_LEG_CODE
353: and rule_type = 'S'
354: and exists
355: (select null
360: and segment_attribute_type = 'ASSIGNMENT'
361: and attribute_value = 'Y')
362: and exists
363: (select null
364: from pay_legislation_rules
365: where legislation_code = P_LEG_CODE
366: and rule_type = 'SDL'
367: and rule_mode = 'A') ;
368:
367: and rule_mode = 'A') ;
368:
369: cursor scl_cwk is
370: select rule_mode
371: from pay_legislation_rules
372: where legislation_code = P_LEG_CODE
373: and rule_type = 'CWK_S'
374: and exists
375: (select null
380: and segment_attribute_type = 'ASSIGNMENT'
381: and attribute_value = 'Y')
382: and exists
383: (select null
384: from pay_legislation_rules
385: where legislation_code = P_LEG_CODE
386: and rule_type = 'CWK_SDL'
387: and rule_mode = 'A');
388: