Link to home
Start Free TrialLog in
Avatar of Subhashini Elango
Subhashini Elango

asked on

SQL Script Output

Hi,

I am runing the following script using SQL Plus and requires all the DBMS_OUTPUT in single line. One of the DBMS_OUTPUT has 250 characters max.

If I use set linesize 250, the other lines has gaps in between then. Is there anyway in Oracle to make all the DBMS Output in single line?

-- build.sql
set serveroutput on
set feedback off
BEGIN
DBMS_OUTPUT.PUT_LINE('-- Creating Replicat');
DBMS_OUTPUT.PUT_LINE('REPLICAT RCSRN10A');
DBMS_OUTPUT.PUT_LINE('USERID xxxxxx@XXXXXXX, PASSWORD xxx');
DBMS_OUTPUT.PUT_LINE('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
...
...
END;
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sean Stuber
Sean Stuber

You'll still have a limit of 32767 characters for a single line.
As long as your total output is less than that, then PUT should work fine.
all those x's are nice, but you could use rpad

DBMS_OUTPUT.PUT_LINE(rpad('x', 91, 'x'));