The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT arps.customer_trx_id, arps.payment_schedule_id,
arps.terms_sequence_number
FROM ar_payment_schedules arps
WHERE arps.customer_Trx_id = cp_customer_trx_id
AND arps.status = cp_status
order by arps.due_date asc
;
CURSOR c_exists is select distinct 'x'
from ar_payment_schedules ps1
where exists ( select 'x'
from ar_payment_schedules ps2
where status = 'CL'
and ps2.customer_trx_id = fp_customer_trx_id
)
and exists ( select 'x'
from ar_payment_schedules ps3
where status = 'OP'
and ps3.customer_trx_id = fp_customer_trx_id
)
order by ps1.customer_Trx_id
;
UPDATE ar_payment_schedules
SET terms_sequence_number = l_arpsched( l_idx2 ).terms_sequence_number
WHERE customer_trx_id = l_arpsched( l_idx2 ).customer_trx_id
AND payment_schedule_id = l_arpsched( l_idx2 ).payment_schedule_id
;
l_select_cursor INTEGER;
l_select_cursor := dbms_sql.open_cursor;
dbms_sql.parse(l_select_cursor,
'select count( distinct invoice_currency_code ), sum(amount_due_remaining), sum(acctd_amount_due_remaining) from '||p_from_clause||' '||l_out_where_clause,
dbms_sql.v7);
|Define columns for the select statement. |
+-----------------------------------------------------------------------*/
arp_standard.debug('Defining Columns +');
dbms_sql.define_column(l_select_cursor, 1 , l_count);
dbms_sql.define_column(l_select_cursor, 2 , l_amount);
dbms_sql.define_column(l_select_cursor, 3 , l_func_amount);
dbms_sql.bind_variable(l_select_cursor, l_actual_bind_var, l_literal_tbl(l_ctr).stripped_value);
l_ignore := dbms_sql.execute(l_select_cursor);
IF dbms_sql.fetch_rows(l_select_cursor) > 0 then
/*-----------------------------------------------------------------------+
|Fetch the column values, into actual variables |
+-----------------------------------------------------------------------*/
arp_standard.debug('Fetching column values +');
dbms_sql.column_value(l_select_cursor, 1, l_count);
dbms_sql.column_value(l_select_cursor, 2, l_amount);
dbms_sql.column_value(l_select_cursor, 3, l_func_amount);
dbms_sql.close_cursor(l_select_cursor);
select length(l_in_where_clause)
into l_actual_length
from dual;
select instr(l_in_where_clause, 'order by')
into l_by_clause_pos
from dual;
SELECT INSTR(l_in_where_clause, 'group by')
INTO l_by_clause_pos
FROM DUAL;
select substr(l_in_where_clause, l_ctr, 1)
into l_temp_cell
from dual;
SELECT SUBSTR(l_in_where_clause, l_by_clause_pos)
INTO l_balance_clause
FROM dual;