139: c2_rec c2%rowtype;
140:
141: cursor c3 is
142: select asset_id
143: from fa_books
144: where x_asset_id = fa_books.asset_id
145: and exists
146: (select 1 from fa_books fabk
147: where x_asset_id = fabk.asset_id
140:
141: cursor c3 is
142: select asset_id
143: from fa_books
144: where x_asset_id = fa_books.asset_id
145: and exists
146: (select 1 from fa_books fabk
147: where x_asset_id = fabk.asset_id
148: and fabk.book_type_code = x_book_type_code
142: select asset_id
143: from fa_books
144: where x_asset_id = fa_books.asset_id
145: and exists
146: (select 1 from fa_books fabk
147: where x_asset_id = fabk.asset_id
148: and fabk.book_type_code = x_book_type_code
149: and fabk.date_ineffective is null
150: and fabk.period_counter_fully_retired is null