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('REPL ICAT RCSRN10A');
DBMS_OUTPUT.PUT_LINE('USER ID xxxxxx@XXXXXXX, PASSWORD xxx');
DBMS_OUTPUT.PUT_LINE('xxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxx');
...
...
END;
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('REPL
DBMS_OUTPUT.PUT_LINE('USER
DBMS_OUTPUT.PUT_LINE('xxxx
...
...
END;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
all those x's are nice, but you could use rpad
DBMS_OUTPUT.PUT_LINE(rpad( 'x', 91, 'x'));
DBMS_OUTPUT.PUT_LINE(rpad(
As long as your total output is less than that, then PUT should work fine.