Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Writing blank lines using DBMS_OUTPUT

Kevin TysonApr 5 2006 — edited Apr 5 2006
I'm using SQLPlus 9.2.0.1 from Windows XP to connect to an Oracle 9.2.0.6 database. I'm creating a report in SQLPlus and I'd like to call internal Oracle PL/SQL procedures to get most of the results. I get the results using DBMS_OUTPUT.PUT_LINE which works fine. However, when I try to add some formatting by putting blank lines between different results, the blank lines don't appear. The code:

DBMS_OUTPUT.NEW_LINE();
DBMS_OUTPUT.NEW_LINE();
DBMS_OUTPUT.PUT_LINE( 'ADAM Metrics for the month beginning: ' ||
TO_CHAR( v_report_start, 'DD-MON-YYYY' ) );
DBMS_OUTPUT.PUT_LINE( ' ' );
DBMS_OUTPUT.PUT_LINE( ' ' );
DBMS_OUTPUT.PUT_LINE( 'Number of ADAM users who have security access: ' || TO_CHAR(v_count_cr_users) );


Results in the following output:

SQL> execute report_cr_metrics_2;
ADAM Metrics for the month beginning: 01-MAR-2006
Number of ADAM users who have security access: 658

All the new lines and put lines with just white space are lost. Using spaces and tabs in the PUT_LINE function doesn't work. Is there a special character I should be using? Is there some SQLPlus setting that removes blank lines?

Kevin Tyson
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 3 2006
Added on Apr 5 2006
6 comments
7,022 views