SQL Language (MOSC)

MOSC Banner

sqlplus new line mystery

edited Sep 2, 2015 11:02AM in SQL Language (MOSC) 7 commentsAnswered ✓

I have a script as follows, but the chr(10 does not work to insert a new line, instead a get a space, I have also tried exec dbms_output.new_line();,  : 

#!/bin/bash

source /home/oracle/.profile_dws_11202

cd /home/oracle

result=$(sqlplus  -S ehcdba/all2fine << EOF

set head off

set feed off

set pagesize 999

set linesize 80

set time on

set timing on

set serveroutput on size 1000000

spool /home/oracle/stats.out

select '=================' from dual;

exec dbms_output.new_line();

select '=================' from dual;

select OWNER,TABLE_NAME,PARTITION_NAME,SUBPARTITION_NAME,NUM_ROWS,

        LAST_ANALYZED from dba_TAB_STATISTICS where STALE_STATS='YES' and table_name = 'FACT_ORDER_CLINICAL' and owner = 'EHCDWH';

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center