The following lines contain the word 'select', 'insert', 'update' or 'delete':
select depr_when_acquired_flag
from fa_convention_types ct
where ct.prorate_convention_code = bks_prorate_convention_code
and ct.fiscal_year_name = bks_fiscal_year_name;
select count(1)
into lv_count
from fa_book_controls
where book_type_code = X_BOOK_TYPE_CODE
and nvl(date_ineffective, sysdate+1) > sysdate
and rownum < 2;
SELECT count(1)
INTO l_grp_count
FROM fa_category_book_defaults cbd, fa_books bks
WHERE cbd.category_id = X_Category_Id
AND cbd.book_type_code = X_BOOK_TYPE_CODE
AND cbd.book_type_code = bks.book_type_code
AND cbd.group_asset_id = bks.asset_id
AND bks.Date_Placed_In_Service between cbd.start_dpis and
nvl(cbd.end_dpis,bks.Date_Placed_In_Service)
AND bks.date_ineffective is null
AND NVL(bks.disabled_flag, 'N') = 'Y';
select count(1)
into lv_count
from fa_books
where asset_id = X_ASSET_ID
and book_type_code = X_BOOK_TYPE_CODE
and date_ineffective is null
and rownum < 2;
select count(1)
into lv_count
from fa_books bk, fa_book_controls bc
where bk.asset_id= X_ASSET_ID
and bk.book_type_code <> X_BOOK_TYPE_CODE
and bk.date_ineffective is null
and bk.book_type_code = bc.book_type_code
and bc.book_class = 'CORPORATE'
and rownum < 2;
select greatest(dp.calendar_period_open_date,
least(sysdate,dp.calendar_period_close_date))
into X_DPIS
from fa_deprn_periods dp
where dp.book_type_code = X_BOOK_TYPE_CODE
and dp.period_close_date is null;
select deprn_expense_acct
into X_EXPENSE_ACCT
from fa_category_books
where category_id = X_CATEGORY_ID
and book_type_code = X_BOOK_TYPE_CODE;
select accounting_flex_structure
into X_ACCT_FLEX_NUM
from fa_book_controls
where book_type_code = X_BOOK_TYPE_CODE;
select count(*)
into lv_count
from fa_deprn_periods
where book_type_code = X_BOOK_TYPE_CODE
and period_close_date is null
and X_DPIS > calendar_period_close_date;
select prorate_convention_code
into X_PRORATE_CONVENTION_CODE
from fa_category_book_defaults
where book_type_code = X_BOOK_TYPE_CODE
and category_id = X_CATEGORY_ID
and X_DPIS between start_dpis and nvl(end_dpis, X_DPIS);
select prorate_date
into X_PRORATE_DATE
from fa_conventions
where prorate_convention_code = X_PRORATE_CONVENTION_CODE
and X_DPIS between start_date and end_date;
select count(*)
into lv_count
from fa_calendar_periods cp,
fa_book_controls bc
where bc.book_type_code = X_BOOK_TYPE_CODE
and bc.prorate_calendar = cp.calendar_type
and X_PRORATE_DATE between cp.start_date and cp.end_date;
select count(1)
into lv_count
from fa_category_books
where category_id = X_CATEGORY_ID
and book_type_code = X_BOOK_TYPE_CODE
and cip_cost_acct is not null
and cip_clearing_acct is not null
and rownum < 2;
select count(1)
into lv_count
from fa_category_books
where book_type_code = X_BOOK_TYPE_CODE and
category_id = X_CATEGORY_ID
and rownum < 2;