Originally posted by dba_admin
Why cannot I simply use ' ' to output a space key? I thought this is just the issue of SQL Plus setting.
You thought correctly. No need to use warious CHR() and simmilar tricks to suppres SQL*Plus from trimming the leading spaces with DBMS_OUTPUT. Just read te SQL*Plus manual about the options about SET SERVEROUTPUT FORMAT setting. Example:
Code:
SQL> set serveroutput on
SQL> exec dbms_output.put_line(' There should be leading spaces.')
There should be leading spaces.
PL/SQL procedure successfully completed.
SQL> set serveroutput on format
Usage: SET SERVEROUTPUT { ON | OFF } [SIZE n]
[ FOR[MAT] { WRA[PPED] | WOR[D_WRAPPED] | TRU[NCATED] } ]
SQL> set serveroutput on format wrapped
SQL> exec dbms_output.put_line(' There should be leading spaces.')
There should be leading spaces.
PL/SQL procedure successfully completed.
SQL>
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Bookmarks