My Oracle Support Banner

How Can I Suppress A New Line Between Select Statements In Sqlplus Script? (Doc ID 559882.1)

Last updated on OCTOBER 27, 2021

Applies to:

SQL*Plus - Version 10.2.0.2 and later
Information in this document applies to any platform.

Goal

When running the following script in SQL+:

set linesize 11
set feedback off
set heading off
set serveroutput off
set termout off
set newpage none
spool c:\test.CSV;

select to_char(mydate,'dd.mm.yyyy') || ';' from mytable;
select to_char(sysdate, 'dd.mm.yyyy') || ';' from dual;
select trim(count(*)) || ';' from mytable;

spool off;
disconnect;
exit;

The output generated is:
10.10.2007;
25.03.2008;
187;

How can the new lines between statements be suppressed and the following output be achieved? 

10-OCT-07;25.03.2008;187;

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.