When I execute the below query, the output I am getting is the PL/SQL procedure completed. Instead of the actual result. How can I output the result of the execution of that statement on the screen
Declare
v_sql varchar2(500);
v_schema varchar(30);
v_event varchar2(500):= 'EVENT NAME';
v_email varchar2(200) := 'Name@XYZ.com';
v_prj_id varchar2(4000):='ProjectA,ProjectB,ProjectC,ProjectD';
BEGIN
Dbms_Output.Put_Line('v_prj_id='||v_prj_id);
--
FOR i IN (SELECT trim(regexp_substr(v_prj_id, '[^,]+', 1, LEVEL)) l
FROM dual
CONNECT BY LEVEL <= regexp_count(v_prj_id, ',') + 1
) LOOP
--
Dbms_Output.Put_Line('---------------------');
--
--
v_sql := 'UPDATE ' || i.l|| '.Table set email = email ||'';''||:1 WHERE
EVENT = :2' ;
--
Dbms_Output.Put_Line('v_sql='||v_sql);
--
begin
EXECUTE IMMEDIATE v_sql USING v_email, v_event;
Exception
when others then
Dbms_Output.Put_Line('sqlerrm='||sqlerrm);
End;
--
END LOOP;
END;
The actual results am getting is PL/SQL procedure completed. but I was expecting the output result of the execution of that statement on the screen