The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT substr(cp.user_concurrent_program_name, 1, 80)
INTO l_report_name
FROM FND_CONCURRENT_PROGRAMS_VL cp,
FND_CONCURRENT_REQUESTS cr
WHERE cr.request_id = P_CONC_REQUEST_ID
AND cp.application_id = cr.program_application_id
AND cp.concurrent_program_id = cr.concurrent_program_id;
select nvl(sum(extended_amount),0)
into adjusted_amount
from ra_customer_trx trx, ra_customer_trx_lines line
where trx.customer_trx_id = line.customer_trx_id
and trx.customer_trx_id = child_customer_trx_id
and complete_flag = 'Y';
select nvl(sum(amount), 0)
into adjusted_amount
from ar_adjustments
where customer_trx_id = customer_trx_id1
and subsequent_trx_id = child_customer_trx_id
and adjustment_type = 'C';
select nvl(sum(amount),0)
into adjusted_amount
from ar_adjustments
where customer_trx_id = child_customer_trx_id
and subsequent_trx_id is null
and adjustment_type = 'C';
select
nvl(sum(nvl(pay.commitment_applied_amount, 0) -
nvl(pay.commitment_interfaced_amount,0)),0) om_commitment_amt
into unbooked_amt
from oe_order_lines lin,
oe_payments pay
where lin.header_id = pay.header_id(+)
and lin.line_id = pay.line_id(+)
and lin.commitment_id = customer_trx_id1
and NVL(lin.open_flag,'Y') = 'Y'
and nvl(lin.booked_flag,'N') = 'N';
select NVL(oe_amount,0) +
NVL( SUM(NVL(i.promised_commitment_amount,
i.amount)), 0)
into oe_amount
from ra_interface_lines i,
ra_customer_trx_lines l
where nvl(interface_status,
'A') <> 'P'
and i.line_type = 'LINE'
and i.reference_line_id = l.customer_trx_line_id
and l.customer_trx_id = customer_trx_id1
and i.interface_line_context = p_so_source_code
and (EXISTS
( select 'valid_trx_type'
from ra_cust_trx_types ty
where (i.cust_trx_type_name = ty.name OR
i.cust_trx_type_id = ty.cust_trx_type_id)
AND ty.type = 'INV')
OR EXISTS (select 'valid sub_trx_type'
from ra_customer_trx trx,
ra_cust_trx_types ty
where trx.customer_trx_id = customer_trx_id1
and trx.cust_trx_type_id = ty.cust_trx_type_id
and (i.cust_trx_type_name is null AND
i.cust_trx_type_id is null AND
ty.subsequent_trx_type_id is not null)));
select meaning
into w_meaning
from fnd_lookups
where lookup_type = p_lookup_type
and lookup_code = p_lookup_code ;
SELECT
MEANING
INTO order_meaning
FROM AR_LOOKUPS
WHERE LOOKUP_TYPE = 'SORT_BY_RAXCBR'
AND UPPER(LOOKUP_CODE) = UPPER(P_SORT_BY);
select nvl(sum(amount),0)
into adjusted_amount
from ar_adjustments
where customer_trx_id = child_customer_trx_id
and subsequent_trx_id = child_cm_customer_trx_id
and adjustment_type = 'C';
select nvl(sum(amount), 0)
into adjusted_amount
from ar_adjustments
where customer_trx_id = customer_trx_id1
and subsequent_trx_id = child_cm_customer_trx_id
and adjustment_type = 'C';
SELECT
MEANING
INTO meaning
FROM FND_LOOKUP_VALUES_VL
WHERE LOOKUP_TYPE = 'RAXCBR_FORMAT'
AND UPPER(LOOKUP_CODE) = UPPER(P_LEVEL);