psj01 psj01 - 2 years ago 84
SQL Question

Why does my dbms_output.put('AAA'); line not printing anything...?

i number(1);
j number(1);
<< outer_loop >>
FOR i IN 1..2 LOOP
<< inner_loop >>
FOR j IN 1..i LOOP
END loop inner_loop;
END loop outer_loop;

I have the code above .. but its not printing 'AAA' ..
it works fine if i do dbms_output.put_line('AAA');

but i want to be able to print it on one line..

Why isn't dbms_output.put('AAA'); not working?..

Answer Source

Even if you want to print in one line, you´ll need a final dbms_out.put_line which will "flush" the output. If you don´t, you won´t see anything ...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download