200: -- Reimplemented code to avoid needless
201: -- deletion and recreation of balance
202: -- feeds (thereby avoiding needless loss
203: -- of latest balances). We don't now delete
204: -- from hr_s_balance_feeds_f ... we only
205: -- select back those feeds that don't match
206: -- rows in pay_balance_feeds_f instead.
207: -- Bug 1490386.
208: -- 115.40 amills 21-Dec-2000 1550308. Handle exception whereby
1769: -- Cursor to install child balance feeds
1770: -- that don't already exist in pay_balance_feeds_f
1771:
1772: select distinct *
1773: from hr_s_balance_feeds_f hrs
1774: where hrs.balance_type_id = bal_type_id
1775: and not exists (
1776: select null
1777: from pay_balance_feeds_f pbf
1835:
1836: update /*+NO_INDEX*/ hr_s_BALANCE_CLASSIFICATIONS
1837: set balance_type_id = balance_type_id - 50000000;
1838:
1839: update /*+NO_INDEX*/ hr_s_BALANCE_FEEDS_F
1840: set balance_type_id = balance_type_id - 50000000;
1841:
1842: update /*+NO_INDEX*/ hr_s_BALANCE_TYPES
1843: set balance_type_id = balance_type_id - 50000000;
2027: update hr_s_balance_classifications
2028: set balance_type_id = l_new_surrogate_key
2029: where balance_type_id = stu_rec.c_surrogate_key;
2030:
2031: update hr_s_balance_feeds_f
2032: set balance_type_id = l_new_surrogate_key,
2033: new_balance_type_flag = v_new_balance_type_flag
2034: where balance_type_id = stu_rec.c_surrogate_key;
2035:
2097: delete from hr_s_defined_balances
2098: where balance_type_id = stu_Rec.c_surrogate_key;
2099:
2100:
2101: delete from hr_s_balance_feeds_f
2102: where balance_type_id = stu_Rec.c_surrogate_key;
2103:
2104: delete from hr_s_balance_types
2105: where rowid = stu_rec.rowid;
2637: --
2638: -- This statement removes any balance feeds from
2639: -- pay_balance_feeds_f that belong to a balance_type_id
2640: -- in hr_s_balance_types but do not exist in
2641: -- hr_s_balance_feeds_f.
2642:
2643: --PSEUDO
2644: if hr_legislation.g_pseudo_enabled = 'Y' THEN
2645: -- only delete feeds that are Oracle seeded as pseudo seeded won't be redelivered
2651: AND pbf.last_updated_by <= 2
2652: and pbf.balance_feed_id <= l_initbfid
2653: and not exists (
2654: select null
2655: from hr_s_balance_feeds_f hrs
2656: where pbf.balance_type_id = hrs.balance_type_id
2657: and pbf.input_value_id = hrs.input_value_id
2658: and pbf.effective_start_date = hrs.effective_start_date
2659: and pbf.effective_end_date = hrs.effective_end_date);
2665: and pbf.legislation_code is not null
2666: and pbf.balance_feed_id <= l_initbfid
2667: and not exists (
2668: select null
2669: from hr_s_balance_feeds_f hrs
2670: where pbf.balance_type_id = hrs.balance_type_id
2671: and pbf.input_value_id = hrs.input_value_id
2672: and pbf.effective_start_date = hrs.effective_start_date
2673: and pbf.effective_end_date = hrs.effective_end_date);