The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT apt.name,
apt.description,
apt.start_date_active,
apt.end_date_active,
apt1.creation_date,
apt1.last_update_date,
apt1.created_by,
apt1.last_updated_by,
apt1.due_percent,
nvl(apt1.due_amount,0),
nvl(apt1.due_days,0),
apt1.due_day_of_month,
apt1.due_months_forward,
nvl(apt1.discount_percent,0),
nvl(apt1.discount_days,0),
apt1.discount_day_of_month,
apt1.discount_months_forward,
apt1.discount_percent_2,
apt1.discount_days_2,
apt1.discount_day_of_month_2,
apt1.discount_months_forward_2,
apt1.discount_percent_3,
apt1.discount_days_3,
apt1.discount_day_of_month_3,
apt1.discount_months_forward_3
FROM ap_terms apt,ap_terms_lines apt1
WHERE apt.name like name1 AND
apt.term_id = apt1.term_id AND
apt1.sequence_num = 1 AND
apt.last_update_date BETWEEN
nvl(startdate,apt.last_update_date) AND
nvl(enddate,apt.last_update_date);
last_update_date out date,
last_updated_by out number,
row_to_fetch in out number,
statuscode out number) IS
BEGIN
IF NOT payment_terms%ISOPEN THEN
OPEN payment_terms(startdate,enddate,name1);
last_update_date,
created_by,
last_updated_by ,
duepercent ,
dueamount ,
duedays ,
duedayofmonth ,
duemonthsforward ,
discountpercent ,
discountdays ,
discountdayofmonth ,
discountmonthforward ,
discountpercent2 ,
discountdays2 ,
discountdayofmonth2 ,
discountmonthsforward2 ,
discountpercent3 ,
discountdays3 ,
discountdayofmonth3 ,
discountmonthsforward3;