I am creating a dynamic query in a procedure and now want to see it through dbms_output.putline
, but my query contains more than 255 characters.
How to view the query?
What are the alternates of dbms_output.putline
?
I am creating a dynamic query in a procedure and now want to see it through dbms_output.putline
, but my query contains more than 255 characters.
How to view the query?
What are the alternates of dbms_output.putline
?
There's a little bit of confusion going on.
In Oracle 9i dbms_output.put_line
is limited to 255 characters. This restriction was removed in 10g and is similarly not present in Oracle 11g.
You have tagged your question oracle10g, which means that you're limited to 32,767 bytes, the standard PL/SQL maximum.
try mess around something like
create or replace procedure custom_output(in_string in varchar2 )
is
out_string_in long default in_string;
str_len number;
loop_count number default 0;
begin
str_len := length(out_string_in);
while loop_count < str_len
loop
dbms_output.put_line( substr( out_string_in, loop_count +1, 255 ) );
loop_count := loop_count +255;
end loop;
end;
/