The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT *
FROM igi_imp_iac_interface_ctrl ic
WHERE ic.book_type_code = p_book_type_code
AND ic.category_id = nvl(p_Category_id,ic.category_id);
SELECT 'Y'
FROM igi_iac_transaction_headers it
WHERE it.book_type_code = cp_book
AND it.category_id = nvl(p_Category_id,it.category_id)
AND NOT ( nvl(it.transaction_sub_type,'AA') = 'IMPLEMENTATION')
AND rownum = 1 ;
SELECT ic.period_counter-1 , ic.corp_book
INTO l_period_counter , l_corporate_book
FROM igi_imp_iac_controls ic
WHERE ic.book_type_code = p_book_type_code ;
Delete igi_iac_adjustments a
Where a.book_type_code = l_corporate_book
and exists ( select i.asset_id
from igi_imp_iac_interface I
where i.book_type_code = p_book_type_code
and i.category_id = nvl(p_category_id,i.category_id)
and i.asset_id = a.asset_id );
p_string => SQL%rowcount || ' rows deleted.');
Delete from igi_iac_det_balances d
Where d.book_type_code = l_corporate_book
and exists ( select i.asset_id
from igi_imp_iac_interface I
where i.book_type_code = p_book_type_code
and i.category_id = nvl(p_category_id,i.category_id)
and i.asset_id = d.asset_id );
p_string => SQL%rowcount || ' rows deleted.');
Delete from igi_iac_fa_deprn d
Where d.book_type_code = l_corporate_book
and exists ( select i.asset_id
from igi_imp_iac_interface I
where i.book_type_code = p_book_type_code
and i.category_id = nvl(p_category_id,i.category_id)
and i.asset_id = d.asset_id );
p_string => SQL%rowcount || ' rows deleted.');
Delete from igi_iac_asset_balances b
Where b.book_type_code = l_corporate_book
and exists ( select i.asset_id
from igi_imp_iac_interface I
where i.book_type_code = p_book_type_code
and i.category_id = nvl(p_category_id,i.category_id)
and i.asset_id = b.asset_id );
p_string => SQL%rowcount || ' rows deleted.');
Delete from igi_iac_transaction_headers t
Where t.book_type_code = l_corporate_book
and exists ( select i.asset_id
from igi_imp_iac_interface I
where i.book_type_code = p_book_type_code
and i.category_id = Nvl(p_category_id,i.category_id)
and i.asset_id = t.asset_id );
p_string => SQL%rowcount || ' rows deleted.');
Delete igi_iac_revaluations r
where r.revaluation_id in ( select c.revaluation_id
from igi_iac_reval_categories c
where c.book_type_code = l_corporate_book
and category_id = nvl(p_category_id,category_id) );
p_string => SQL%rowcount || ' rows deleted.');
Delete igi_iac_reval_categories c
where c.book_type_code = l_corporate_book
and c.category_id = nvl(p_category_id,c.category_id) ;
p_string => SQL%rowcount || ' rows deleted.');
Delete igi_iac_revaluation_rates c
where c.book_type_code = l_corporate_book
and EXISTS ( SELECT a.asset_id
FROM fa_additions a
WHERE a.asset_category_id = nvl(p_category_id,a.asset_category_id)
AND a.asset_id = c.asset_id );
p_string => SQL%rowcount || ' rows deleted.');
Update igi_imp_iac_interface_ctrl c
set c.transfer_status = 'N'
where c.book_type_code = p_book_type_code
and c.category_id = nvl(p_category_id,c.category_id) ;
fnd_message.set_token('OPERATION', 'update transfer status to Not Transferred');
p_string => SQL%rowcount || ' rows updated.');
Update igi_imp_iac_interface i
set i.transferred_flag = 'N'
where i.book_type_code = p_book_type_code
and i.category_id = nvl(p_category_id,i.category_id) ;
fnd_message.set_token('OPERATION', 'update transfer flag to N');
p_string => SQL%rowcount || ' rows updated.');