DBMS_OUTPUT and LPAD

From: David E. Daniel <david.daniel_at_wmich.edu>
Date: 1997/02/21
Message-ID: <330E5A18.3B1E_at_wmich.edu>#1/1


Greetings,

I am having a little difficulty with the DBMS_OUTPUT in PL/SQL. I am trying to format a report and I am having trouble adding leading blank spaces. I am using the following command:

padded_str := ' '; /* This is declared a varchar2(20) */ DBMS_OUTPUT.PUT_LINE
[Quoted] (LPAD(padded_str,2*(lev1 -1))||d2.file_id||' --- '||d2.file_title);

The output looks like the following:

9051034-10 *** some title (irr)
9023045-23 *** another title

What it should look like

9051034-10 *** some title (irr)
  9023045-23 *** another title

The report is to generate a family tree. If I use the foloowing as my padded_str, I get the desired results, but it leaves a period at the beginning of each line.
padded_str:= '. ';

Any help with this would save what little hair I have left.

Also, could someone please let me know how to perform a line feed
[Quoted] (blank line) when using the DBMS_OUTPUT package?

Regards,

David E. Daniel
david.daniel_at_wmich.edu

-- 
David E. Daniel			
Oracle Database Administrator	
University Computing Services
Western Michigan University
Received on Fri Feb 21 1997 - 00:00:00 CET

Original text of this message