The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT RET.RETIREMENT_ID,
RET.ASSET_ID
FROM FA_RETIREMENTS RET,
FA_BOOKS FAB,
FA_METHODS M
WHERE RET.BOOK_TYPE_CODE = p_book_type_code
AND RET.STATUS in ('PENDING', 'REINSTATE', 'PARTIAL')
AND M.METHOD_CODE(+) = RET.STL_METHOD_CODE
AND M.LIFE_IN_MONTHS(+) = RET.STL_LIFE_IN_MONTHS
AND FAB.RETIREMENT_ID= RET.RETIREMENT_ID
AND FAB.BOOK_TYPE_CODE= RET.BOOK_TYPE_CODE
AND FAB.ASSET_ID= RET.ASSET_ID
AND RET.RETIREMENT_ID > px_max_retirement_id
AND MOD(nvl(FAB.GROUP_ASSET_ID,RET.RETIREMENT_ID), p_total_requests) = (p_request_number - 1)
ORDER BY
RET.RETIREMENT_ID;
select asset_number into l_asset_number from fa_additions where asset_id = l_asset_id(l_loop_count);--bug 3087644 fix
select count(*)
into l_count
from fa_deprn_summary
where book_type_code = l_asset_hdr_rec.book_type_code
and asset_id = l_asset_hdr_rec.asset_id
and period_counter = l_period_rec.period_counter;
select transaction_type_code
into l_trx_type_code
from fa_transaction_headers
where transaction_header_id=
(select transaction_header_id_in
from fa_retirements
where retirement_id=p_retirement_id);
select date_effective
into ret.date_effective
from fa_retirements
where retirement_id = l_asset_retire_rec.retirement_id;
select date_effective
into ret.date_effective
from fa_retirements_mrc_v
where retirement_id = lv_asset_retire_rec.retirement_id;
select asset_type
into l_asset_type
from fa_additions_b
where asset_id = l_asset_hdr_rec.asset_id;
element => 'setting up parameters for event update, ret_status ',
value => l_asset_retire_rec.status,
p_log_level_rec => p_log_level_rec);
select transaction_header_id_out
into l_thid
from fa_retirements
where retirement_id = l_asset_retire_rec.retirement_id;
select event_id,
transaction_date_entered
into l_event_id,
L_trx_date_entered
from fa_transaction_headers
where transaction_header_id = l_thid;
update fa_transaction_headers
set event_id = l_trans_rec.event_id
where transaction_header_id = l_thid;
element => 'calling fa_xla_events_pvt.update_transaction_event with thid: ',
value => l_thid);
if not fa_xla_events_pvt.update_transaction_event
(p_ledger_id => l_primary_sob_id,
p_transaction_header_id => l_thid,
p_book_type_code => l_asset_hdr_rec.book_type_code,
p_event_type_code => l_event_type_code,
p_event_date => greatest(l_trx_date_entered,
l_period_rec.calendar_period_open_date),
p_event_status_code => XLA_EVENTS_PUB_PKG.C_EVENT_UNPROCESSED,
p_calling_fn => l_calling_fn,
p_log_level_rec => p_log_level_rec) then
raise gainloss_err;