Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: dbms_output.put_line

Re: dbms_output.put_line

From: Phil Herring <revdoc_at_uow.edu.au>
Date: 1997/11/18
Message-ID: <64r4e6$ir0$1@wyrm.its.uow.edu.au>#1/1

In article <64qt7l$hae$1_at_nntp3.interaccess.com> Ari Kaplan, akaplan_at_interaccess.com writes:
>It's not pretty, but it works:
>
>DBMS_OUTPUT.PUT_LINE('col1 col2');
>DBMS_OUTPUT.PUT_LINE(lpad(to_char(col1),4)||lpad(to_char(col2),10));

Erm... it's not pretty, and it doesn't work :)

Seriously, the leading spaces will be stripped off. You probably don't want this to happen. I usually precede output like this with some non-whitespace character to stop this from happening. For example:

DBMS_OUTPUT.PUT_LINE('* col1 col2'); DBMS_OUTPUT.PUT_LINE('* ' || lpad(to_char(col1),4)||lpad(to_char(col2),10));



Copyright 1997 Phil Herring. This article may not be reproduced for profit.
Received on Tue Nov 18 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US