How do you prevent dbms_output.put_line from trimming leading whitespace?

Posted by Jared on Stack Overflow See other posts from Stack Overflow or by Jared
Published on 2010-04-06T11:41:28Z Indexed on 2010/04/06 11:43 UTC
Read the original article Hit count: 219

Filed under:
|

I am trying to right-align the output of some PL/SQL code, but dbms_output.put_line is trimming the leading whitespace from my strings. How do I make it stop? Or is there a better way to output strings with leading whitespace?

dbms_output.put_line(lpad('string', 30, ' '));

outputs:

string

instead of:

                        string

© Stack Overflow or respective owner

Related posts about plsql

Related posts about Oracle