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