Hi,
I have a PL/SQL block like this:
set serveroutput on
declare
t_rc sys_refcursor;
v_sql varchar2(2000);
begin
---
v_sql := q'{
select
t.id as id,
(t.id || ':' || t.customer) as customer
from
(
select
rownum as id,
(customer_id || ':' || cust_first_name || ':' || cust_last_name) as customer
from
customers
) t
}';
---
open t_rc for v_sql;
for c in v_sql
loop
<... do something with each row and insert ...>
end loop;
---
end;
/
This piece of code is not the correct syntax.
Does someone know how to build such a for-loop, with a "variable" SQL text in v_sql?
Kind Regards