The following lines contain the word 'select', 'insert', 'update' or 'delete':
select count(*) into h_count
from fa_book_controls
where book_Type_code = argument1 and rownum < 2;
select mrc_sob_type_code,currency_code
into FARX_C_WD.mrc_sob_type,FARX_C_WD.currency
from gl_sets_of_books
where set_of_books_id = to_number(argument20);
select count(*) into h_count
from fa_book_controls bc, fa_calendar_periods cp
where bc.book_type_code = argument1
and bc.deprn_calendar = cp.calendar_type
and cp.period_name = argument2 and rownum < 2;
select count(*) into h_count
from fa_book_controls bc, fa_calendar_types ct,
fa_calendar_periods cp
where bc.book_type_code = argument1
and bc.deprn_calendar = ct.calendar_type
and ct.calendar_type = cp.calendar_type
and cp.start_date >= (select cp1.start_date from
fa_calendar_periods cp1
where cp1.calendar_type = cp.calendar_type
and cp1.period_name = argument2);
select category_flex_structure into h_cat_struct
from fa_system_controls;
select count(*) into h_count from fa_categories cat,
fa_category_books cb
where cat.category_id = h_cat_id
and cat.enabled_flag = 'Y' and cat.capitalize_flag = 'YES'
and sysdate between nvl(cat.start_date_active,sysdate-1) and
nvl(cat.end_date_active,sysdate+1)
and cat.category_id = cb.category_id
and cb.book_type_code = argument1 and rownum < 2;
select count(*) into h_count
from fa_methods
where method_code = argument11 and rownum < 2;
select count(*) into h_count from fa_methods
where method_code = argument11
and rate_source_rule in ('TABLE','CALCULATED','FORMULA')
and rownum < 2;
select count(*) into h_count from fa_methods
where method_code = argument11 and life_in_months = to_number(argument12)
and rownum < 2;
select count(*) into h_count from fa_methods m
where m.method_code = argument11
and m.rate_source_rule = 'FLAT' and rownum < 2;
select count(*) into h_count from fa_methods m, fa_flat_rates r
where m.method_code = argument11
and m.method_id = r.method_id
and r.adjusted_rate = h_adj_rate and rownum < 2;
select count(*) into h_count from fa_conventions
where prorate_convention_code = argument14 and rownum < 2;
select count(*) into h_count from fnd_user
where user_id = to_number(argument17) and rownum < 2;
select count(*) into h_count from fa_bonus_rules
where bonus_rule = argument19 and rownum < 2;
select nvl(sum(decode(status,'UNASSIGNED', 1, 0)),0),
nvl(sum(decode(status,'FAILED', 1, 0)),0),
nvl(sum(decode(status,'IN PROCESS', 1, 0)),0),
nvl(sum(decode(status,'COMPLETED',1 , 0)),0),
count(*)
into l_unassigned_cnt,
l_failed_cnt,
l_wip_cnt,
l_completed_cnt,
l_total_cnt
from fa_worker_jobs
where request_id = p_parent_request_id;
update fa_worker_jobs
set status = 'IN PROCESS',
worker_num = p_request_number
where status = 'UNASSIGNED'
and request_id = p_parent_request_id
and rownum < 2;
select start_range
,end_range
into l_start_range
,l_end_range
from fa_worker_jobs
where request_id = p_parent_request_id
and worker_num = p_request_number
and status = 'IN PROCESS';
fa_debug_pkg.add(l_calling_fn, 'selecting', 'null ranges');
update fa_worker_jobs
set status = 'COMPLETED'
where request_id = p_parent_request_id
and worker_num = p_request_number
and status = 'IN PROCESS';
fa_whatif_deprn_pkg.g_deprn.delete;
update fa_worker_jobs
set status = 'COMPLETED'
where request_id = p_parent_request_id
and worker_num = p_request_number
and status = 'IN PROCESS';
update fa_worker_jobs
set status = 'FAILED'
where request_id = p_parent_request_id
and worker_num = p_request_number
and status = 'IN PROCESS';
select category_flex_structure into h_cat_struct
from fa_system_controls;
select count(*) into h_count from fa_categories cat,
fa_category_books cb
where cat.category_id = h_cat_id
and cat.enabled_flag = 'Y' and cat.capitalize_flag = 'YES'
and sysdate between nvl(cat.start_date_active,sysdate-1) and
nvl(cat.end_date_active,sysdate+1)
and cat.category_id = cb.category_id
and cb.book_type_code = argument1 and rownum < 2;
update fa_worker_jobs
set status = 'COMPLETED'
where request_id = p_parent_request_id
and worker_num = p_request_number
and status = 'IN PROCESS';
update fa_worker_jobs
set status = 'FAILED'
where request_id = p_parent_request_id
and worker_num = p_request_number
and status = 'IN PROCESS';
update fa_worker_jobs
set status = 'COMPLETED'
where request_id = p_parent_request_id
and worker_num = p_request_number
and status = 'IN PROCESS';
update fa_worker_jobs
set status = 'FAILED'
where request_id = p_parent_request_id
and worker_num = p_request_number
and status = 'IN PROCESS';
update fa_worker_jobs
set status = 'FAILED'
where request_id = p_parent_request_id
and worker_num = p_request_number
and status = 'IN PROCESS';
fa_whatif_deprn_pkg.g_deprn.delete;
insert into fa_worker_jobs
(start_range, end_range, worker_num, status,request_id)
select min(asset_id), max(asset_id), 0,
'UNASSIGNED', p_parent_request_id from ( select /*+ parallel(dh) */
asset_id, floor(rank()
over (order by asset_id)/l_batch_size ) unit_id
from fa_books
where book_type_code = p_book_type_code )
group by unit_id;
fa_debug_pkg.add(l_calling_fn, 'rows inserted into worker jobs: ', SQL%ROWCOUNT);
fa_debug_pkg.add(l_calling_fn, 'rows inserted into worker jobs: ', x_worker_jobs);