The following lines contain the word 'select', 'insert', 'update' or 'delete':
select transaction_header_id_in,transaction_header_id_out
from fa_retirements
where book_type_code=dpr.book
and asset_id=dpr.asset_id
and retirement_id=retirement_id;
select 'Y'
from fa_books fbks1,
fa_books fbks2
where fbks1.book_type_code = dpr.book
and fbks1.asset_id = dpr.asset_id
and fbks2.book_type_code = fbks1.book_type_code
and fbks2.asset_id = fbks2.asset_id
and fbks1.transaction_header_id_in between l_transaction_header_id_in and nvl(l_transaction_header_id_out,l_transaction_header_id_in)
and fbks2.transaction_header_id_in between l_transaction_header_id_in and nvl(l_transaction_header_id_out,l_transaction_header_id_in)
and fbks2.transaction_header_id_in = fbks1.transaction_header_id_out
and fbks2.adjusted_rate <> fbks1.adjusted_rate ;
select fbks1.adjusted_rate,fbks1.transaction_header_id_in,fbks1.deprn_method_code,
fbks2.adjusted_rate,fbks2.transaction_header_id_in,fbks2.deprn_method_code
from fa_books fbks1,
fa_books fbks2
where fbks1.book_type_code=dpr.book
and fbks1.asset_id=dpr.asset_id
and fbks2.book_type_code =fbks1.book_type_code
and fbks2.asset_id =fbks2.asset_id
and fbks1.transaction_header_id_in between l_transaction_header_id_in and l_transaction_header_id_out
and fbks2.transaction_header_id_in between l_transaction_header_id_in and l_transaction_header_id_out
and fbks2.transaction_header_id_in = fbks1.transaction_header_id_out
and fbks2.adjusted_rate <> fbks1.adjusted_rate;
select fdp.period_num
from fa_transaction_headers fth,
fa_deprn_periods fdp
where fth.transaction_header_id= x_transaction_id
and fdp.book_type_code = dpr.book
and fth.transaction_date_entered
between fdp.calendar_period_open_date and nvl(fdp.calendar_period_close_date,sysdate);
select end_date
into l_pcal_life_end_date
from fa_calendar_periods
where calendar_type = p_cal
and l_life_end_date between start_date and end_date;
select end_date
into l_pcal_ret_end_date
from fa_calendar_periods
where calendar_type = p_cal
and to_date(dpr.ret_prorate_jdate,'j') between start_date and end_date;
select nvl(transaction_header_id_out, transaction_header_id_in) -- Bug# 5074257
from fa_retirements
where retirement_id = ret.retirement_id;
select transaction_type_code
, transaction_date_entered
, transaction_name
, source_transaction_header_id
, mass_reference_id
, transaction_subtype
, transaction_key
, amortization_start_date
, calling_interface
, mass_transaction_id
, fa_std_types.FA_NO_OVERRIDE
, member_transaction_header_id
, trx_reference_id
from fa_transaction_headers
where transaction_header_id = c_thid;
select outbk.salvage_value - inbk.salvage_value
, nvl(outbk.allowed_deprn_limit_amount, 0) -
nvl(inbk.allowed_deprn_limit_amount, 0),
outbk.unrevalued_cost - inbk.unrevalued_cost
from fa_books inbk
, fa_books outbk
where inbk.transaction_header_id_in = ret.th_id_in
and outbk.asset_id = ret.asset_id
and outbk.book_type_code = ret.book
and outbk.transaction_header_id_out = ret.th_id_in;
select outbk.salvage_value - inbk.salvage_value
, nvl(outbk.allowed_deprn_limit_amount, 0) -
nvl(inbk.allowed_deprn_limit_amount, 0),
outbk.unrevalued_cost - inbk.unrevalued_cost
from fa_books_mrc_v inbk
, fa_books_mrc_v outbk
where inbk.transaction_header_id_in = ret.th_id_in
and outbk.asset_id = ret.asset_id
and outbk.book_type_code = ret.book
and outbk.transaction_header_id_out = ret.th_id_in;
select sum(decode(debit_credit_flag, 'CR', -1, 1) * adjustment_amount)
from fa_adjustments
where asset_id = ret.asset_id
and book_type_code = ret.book
and source_type_code = 'RETIREMENT'
and adjustment_type = 'RESERVE'
and transaction_header_id = ret.th_id_in;
select sum(decode(debit_credit_flag, 'CR', -1, 1) * adjustment_amount)
from fa_adjustments_mrc_v
where asset_id = ret.asset_id
and book_type_code = ret.book
and source_type_code = 'RETIREMENT'
and adjustment_type = 'RESERVE'
and transaction_header_id = ret.th_id_in;
select con.prorate_date
from fa_retirements ret,
fa_conventions con
where ret.transaction_header_id_in = c_thid
and con.prorate_convention_code = ret.RETIREMENT_PRORATE_CONVENTION
and c_trx_date between con.start_date and con.end_date ;
select con.prorate_date
from fa_retirements_mrc_v ret,
fa_conventions con
where ret.transaction_header_id_in = c_thid
and con.prorate_convention_code = ret.RETIREMENT_PRORATE_CONVENTION
and c_trx_date between con.start_date and con.end_date ;