The following lines contain the word 'select', 'insert', 'update' or 'delete':
select ti.rowid,
ad.asset_id,
ti.asset_number,
ad.asset_type,
ti.adjusted_rate,
ti.basic_rate,
ti.bonus_rule,
ti.ceiling_name,
ti.cost,
ti.date_placed_in_service,
ti.depreciate_flag,
ti.deprn_method_code,
ti.itc_amount_id,
ti.life_in_months,
ti.original_cost,
ti.production_capacity,
ti.prorate_convention_code,
ti.salvage_value,
ti.short_fiscal_year_flag,
ti.conversion_date,
ti.original_deprn_start_date,
ti.fully_rsvd_revals_counter,
ti.unrevalued_cost,
ti.reval_ceiling,
ti.deprn_reserve,
ti.ytd_deprn,
ti.reval_amortization_basis,
ti.reval_reserve,
ti.ytd_reval_deprn_expense,
decode(ti.amortize_nbv_flag,
'YES', 'AMORTIZED',
'EXPENSED') transaction_subtype,
ti.amortization_start_date,
nvl(ti.transaction_name, 'Tax Upload Interface') transaction_name,
ti.attribute1,
ti.attribute2,
ti.attribute3,
ti.attribute4,
ti.attribute5,
ti.attribute6,
ti.attribute7,
ti.attribute8,
ti.attribute9,
ti.attribute10,
ti.attribute11,
ti.attribute12,
ti.attribute13,
ti.attribute14,
ti.attribute15,
ti.attribute_category_code,
nvl(ti.global_attribute1,
bk.global_attribute1) global_attribute1,
nvl(ti.global_attribute2,
bk.global_attribute2) global_attribute2,
nvl(ti.global_attribute3,
bk.global_attribute3) global_attribute3,
nvl(ti.global_attribute4,
bk.global_attribute4) global_attribute4,
nvl(ti.global_attribute5,
bk.global_attribute5) global_attribute5,
nvl(ti.global_attribute6,
bk.global_attribute6) global_attribute6,
nvl(ti.global_attribute7,
bk.global_attribute7) global_attribute7,
nvl(ti.global_attribute8,
bk.global_attribute8) global_attribute8,
nvl(ti.global_attribute9,
bk.global_attribute9) global_attribute9,
nvl(ti.global_attribute10,
bk.global_attribute10) global_attribute10,
nvl(ti.global_attribute11,
bk.global_attribute11) global_attribute11,
nvl(ti.global_attribute12,
bk.global_attribute12) global_attribute12,
nvl(ti.global_attribute13,
bk.global_attribute13) global_attribute13,
nvl(ti.global_attribute14,
bk.global_attribute14) global_attribute14,
nvl(ti.global_attribute15,
bk.global_attribute15) global_attribute15,
nvl(ti.global_attribute16,
bk.global_attribute16) global_attribute16,
nvl(ti.global_attribute17,
bk.global_attribute17) global_attribute17,
nvl(ti.global_attribute18,
bk.global_attribute18) global_attribute18,
nvl(ti.global_attribute19,
bk.global_attribute19) global_attribute19,
nvl(ti.global_attribute20,
bk.global_attribute20) global_attribute20,
nvl(ti.global_attribute_category,
bk.global_attribute_category) global_attribute_category,
ti.group_asset_id
from fa_tax_interface ti,
fa_books bk,
fa_additions_b ad
where ti.book_type_code = p_book_type_code
and ti.posting_status = 'POST'
and ti.asset_number = ad.asset_number
and bk.asset_id = ad.asset_id
and bk.book_type_code = p_book_type_code
and bk.date_ineffective is null
and ad.asset_id > px_max_asset_id
-- any potential change in group will be
-- assigned to the first worker avoiding
-- the potential locking issues between workers
and decode(ti.group_asset_id,
null,
MOD(nvl(bk.group_asset_id, ad.asset_id), p_total_requests),
0) = (p_request_number - 1)
order by ad.asset_id;
l_asset_fin_mrc_tbl_new.delete;
l_inv_tbl.delete;
l_asset_deprn_mrc_tbl_new.delete;
l_trans_rec.who_info.last_updated_by := FND_GLOBAL.USER_ID;
l_trans_rec.who_info.last_update_date := sysdate;
l_trans_rec.who_info.last_update_login := FND_GLOBAL.CONC_LOGIN_ID;
select nvl(sum(decode(debit_credit_flag,
'DR', adjustment_amount,
-adjustment_amount)), 0)
into l_deprn_exp_amort_nbv
from fa_adjustments
where book_type_code = l_asset_hdr_rec.book_type_code
and asset_id = l_asset_hdr_rec.asset_id
and source_type_code = 'DEPRECIATION'
and adjustment_type = 'EXPENSE';
update fa_tax_interface
set posting_status = 'POSTED',
tax_request_id = l_request_id
where rowid = l_tax_rowid(l_loop_count);