The following lines contain the word 'select', 'insert', 'update' or 'delete':
select asset_number
from fa_additions
where asset_number = x_asset_number;
select asset_number
from fa_mass_additions
where asset_number = x_asset_number;
select initial_asset_id
from fa_system_controls
where initial_asset_id < x_numeric_asset_number;
select asset_type
from fa_additions
where asset_id = x_asset_id;
select book_class
from fa_book_controls
where book_type_code = x_book_type_code;
select asset_id
from fa_books
where x_asset_id = fa_books.asset_id
and exists
(select 1 from fa_books fabk
where x_asset_id = fabk.asset_id
and fabk.book_type_code = x_book_type_code
and fabk.date_ineffective is null
and fabk.period_counter_fully_retired is null
and (fabk.period_counter_fully_reserved is null or
(fabk.period_counter_fully_reserved is not null
and fabk.period_counter_life_complete is not null))
and not exists
(select 1 from fa_retirements faret
where faret.asset_id = x_asset_id
and faret.book_type_code = x_book_type_code
and faret.status in
('PENDING','REINSTATE','PARTIAL')));
select count(*) dummy
from fa_deprn_periods dp, fa_book_controls bc
where trunc(x_date_in_service) >
trunc(nvl(dp.calendar_period_close_date,
x_date_in_service))
and bc.book_class = 'CORPORATE'
and bc.book_type_code = nvl(x_book_type_code, 'X')
and dp.book_type_code = nvl(x_book_type_code, 'X')
and dp.period_close_date is null;
select greatest(dp.calendar_period_open_date,
least(sysdate, dp.calendar_period_close_date))
valid_date
from fa_deprn_periods dp
where dp.book_type_code = nvl(x_book_type_code, 'X')
and dp.period_close_date is null;