Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Displaying a table in DBMS_OUTPUT using OWA package
Dear All,
I have created a procedure to display a table in DBMS_OUTPUT using OWA
package.
PROCEDURE showtable (tablename VARCHAR2)
AS
b BOOLEAN;
OUT CLOB;
irows INTEGER := 1;
BEGIN
OWA.cgi_var_name (1) := 1; OWA.init_cgi_env (OWA.cgi_var_name); HTP.adddefaulthtmlhdr (FALSE);
WHILE irows > 0
LOOP
OUT := OWA.get_line (irows);
IF RTRIM (OUT, CHR (10)) NOT IN ('<PRE>', '</PRE>')
THEN
DBMS_OUTPUT.put_line (OUT);
END IF;
END LOOP;
END;
This procedure displays proper tabular output.
But in few cases it shows tabular output along with <PRE> </PRE> tags.
Also in few cases it inserts unnecessary carriage returns in the
output and therefore the rows in output gets misaligned.
Is this the problem with tool that displays output? I have tested it with SQL * Plus, Toad, Oracle SQL Developer but it displays same output in each case.
Please help me in improving this procedure.
Thanks in advance.
-Sameer Received on Fri Sep 14 2007 - 03:19:26 CDT