214:
215: -- Make sure the new category is defined in all the books the asset belongs to.
216: -- Get the number of books in which the new category is defined for the asset.
217: SELECT count(*) INTO l_check_count1
218: FROM FA_CATEGORY_BOOKS cb, FA_BOOKS bk, fa_book_controls bc
219: WHERE bk.asset_id = p_asset_id
220: AND bk.date_ineffective IS NULL
221: AND bk.book_type_code = cb.book_type_code
222: AND cb.category_id = p_new_category_id