Output from pl/sql-block
Date: Thu, 26 Mar 2009 12:38:57 GMT
is there a way to output from pl/sql-block before end of the block ? I need to:
1) ask some parameters 2) count how many rows are found and show it to the user 3) ask the user, if she/he really wants to update
I would like to do it in one pl/sql-block, but since the dbms_output.put_line is printed only after the block, it doesn't work right.
How would you do this?
set serveroutput on
declare wcount number:=0;
select count(*) into wcount from xx where yy=&&p_yy; dbms_output.put_line('found '||to_char(wcount)|| ' rows'); if wcount > 0 then
if &&continue = 'Y' then dbms_output.put_line('about to update'); .... else dbms_output.put_line('no updates'); end if; else dbms_output.put_line('nothing to update');end if;
And one more question, is there a set <something> off that makes these lines
disappear (I tried feedback and echo):
old 8: IF &&continue = 'Y' then
new 8: IF 'Y' = 'Y' then
TIA, Maija-Leena Received on Thu Mar 26 2009 - 07:38:57 CDT