The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT term_id
INTO X_res_terms_id
FROM ap_terms
WHERE sysdate BETWEEN nvl(start_date_active, sysdate - 1)
AND nvl(end_date_active, sysdate + 1)
AND term_id = X_temp_terms_id;
SELECT name
INTO X_terms_name
FROM ap_terms
WHERE term_id = X_terms_id;
sql_str := 'SELECT name, term_id FROM ap_terms WHERE ';
X_sql_str := 'SELECT start_date_active, end_date_active, enabled_flag FROM ap_terms WHERE ';
cursor C IS SELECT ofg.disable_date disable_date
FROM org_freight ofg
WHERE
ofg.freight_code = p_carrier_rec.freight_carrier_code and
ofg.organization_id = p_carrier_rec.organization_id ;
SELECT terms_id
, fob_lookup_code
, freight_terms_lookup_code
, note_to_vendor
, note_to_receiver
, shipping_control --
INTO x_terms_id
, x_fob_lookup_code
, x_freight_terms
, x_supplier_note
, x_receiver_note
, x_shipping_control --
FROM po_headers_all
WHERE po_header_id = p_po_header_id;
SELECT pay_on_code
, bill_to_location_id
, ship_to_location_id
, ship_via_lookup_code
INTO x_pay_on_code
, x_bill_to_id
, x_ship_to_id
, x_ship_via_code
FROM po_headers_all
WHERE po_header_id = p_po_header_id;
SELECT DECODE (p_terms_rec1.terms_id,
p_terms_rec2.terms_id, 'Y', 'N'),
DECODE (p_terms_rec1.fob_lookup_code,
p_terms_rec2.fob_lookup_code, 'Y', 'N'),
DECODE (p_terms_rec1.freight_terms_lookup_code,
p_terms_rec2.freight_terms_lookup_code, 'Y', 'N'),
DECODE (p_terms_rec1.note_to_vendor,
p_terms_rec2.note_to_vendor, 'Y', 'N'),
DECODE (p_terms_rec1.note_to_receiver,
p_terms_rec2.note_to_receiver, 'Y', 'N'),
DECODE (p_terms_rec1.shipping_control,
p_terms_rec2.shipping_control, 'Y', 'N')
INTO x_comparison_result.terms_id_eq,
x_comparison_result.fob_lookup_code_eq,
x_comparison_result.freight_terms_lookup_code_eq,
x_comparison_result.note_to_vendor_eq,
x_comparison_result.note_to_receiver_eq,
x_comparison_result.shipping_control_eq
FROM dual;
SELECT DECODE (p_terms_rec1.pay_on_code,
p_terms_rec2.pay_on_code, 'Y', 'N'),
DECODE (p_terms_rec1.bill_to_location_id,
p_terms_rec2.bill_to_location_id, 'Y', 'N'),
DECODE (p_terms_rec1.ship_to_location_id,
p_terms_rec2.ship_to_location_id, 'Y', 'N'),
DECODE (p_terms_rec1.ship_via_lookup_code,
p_terms_rec2.ship_via_lookup_code, 'Y', 'N')
INTO x_comparison_result.pay_on_code_eq,
x_comparison_result.bill_to_location_id_eq,
x_comparison_result.ship_to_location_id_eq,
x_comparison_result.ship_via_lookup_code_eq
FROM dual;