The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
piv.input_value_id,
decode(substrb(piv.uom,1,1),'M','N','N','N','I','N','H','N','D','D','T') DATA_TYPE,
decode(
/* N(Number), T(Text), D(Date) */
decode(substrb(piv.uom,1,1),'M','N','N','N','I','N','H','N','D','D','T'),
'N',fnd_number.number_to_canonical(
sum(
decode(
decode(substrb(piv.uom,1,1),'M','N','N','N','I','N','H','N','D','D','T'),
/* BUG3038738: Modified not to return result value if uom is number type. **
** When UOM of that result_value is number type, and it exceeds 20 digits **
** after the decimal point, ORA-06502 error occurs in **
** fnd_number.canonical_to_number() function. Because fnd_number uses a **
** canonical_mask with only 20 decimal places against result_value with up **
** to 38 decimal places. Currently, result_value for number type from this **
** cursor has not been used anywhere. **
'N',fnd_number.canonical_to_number(prrv.result_value),
********************************************************************************* */
'N',
decode(substrb(piv.uom,1,1),'N',0,
fnd_number.canonical_to_number(prrv.result_value)),
NULL
)
)
),
min(distinct prrv.result_value)) RESULT_VALUE
from
pay_run_result_values prrv, -- Run result value
pay_run_results prr, -- Run result
pay_input_values_f piv
where prr.assignment_action_id = p_assignment_action_id
and prr.status in ('P','PA')
and prrv.run_result_id = prr.run_result_id
and piv.input_value_id = prrv.input_value_id
and p_effective_date
between piv.effective_start_date and piv.effective_end_date
group by
piv.input_value_id,
decode(substrb(piv.uom,1,1),'M','N','N','N','I','N','H','N','D','D','T');
select pbf.balance_type_id,
pbf.input_value_id,
pbf.scale
bulk collect into
:b_feed_bal,
:b_feed_iv,
:b_feed_scale
from pay_balance_feeds_f pbf
where pbf.balance_type_id in (' || l_concat_bal || ')
and pbf.input_value_id in (' || l_concat_iv || ')
and :b_feed_cheking_date
between pbf.effective_start_date and pbf.effective_end_date;
l_stmt_str := ' select pbf.balance_type_id,
pbf.input_value_id,
pbf.scale
from pay_balance_feeds_f pbf
where pbf.balance_type_id in (' || l_concat_bal || ')
and pbf.input_value_id in (' || l_concat_iv || ')
and :b_feed_cheking_date
between pbf.effective_start_date and pbf.effective_end_date';
select ppa.effective_date
from pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = p_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id;
select paa.assignment_action_id,
ppa.effective_date
from pay_payroll_actions ppa, -- Run pact
pay_assignment_actions paa, -- Run assact
pay_action_interlocks pai -- Locked by Prepay assact
where pai.locking_action_id = p_assignment_action_id
and paa.assignment_action_id = pai.locked_action_id
and ppa.payroll_action_id = paa.payroll_action_id
and ppa.action_type <> 'V'
and not exists(
select NULL
from pay_payroll_actions ppa2, -- Reversal pact
pay_assignment_actions paa2, -- Reversal assact
pay_action_interlocks pai2 -- Locked by Reversal assact
where pai2.locked_action_id = paa.assignment_action_id
and paa2.assignment_action_id = pai2.locking_action_id
and ppa2.payroll_action_id = paa2.payroll_action_id
and ppa2.action_type = 'V');
select ppp.value
from pay_pre_payments ppp
where ppp.assignment_action_id = p_assignment_action_id
order by ppp.pre_payment_id;