Skip to Main Content

SQL & PL/SQL

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!

sqlplus 12.2, csv export and blank line on top of the CSV file ?

User_EYH5LJan 27 2021

Hello,
I try to generate a CSV file from sqlplus 12.2, with the new instruction : set markup csv on delimiter ';'
set echo off
set feedback off
set term off
set timing off
set embedded on
set trimspool on
set underline off
set LINESIZE 32000
set markup csv on delimiter ';'
Spool PS_H_ACTIFLEET_BATCH.csv
SELECT
to_number(to_char(sysdate,'YYYY')) as YEAR,
to_number(to_char(sysdate,'MM')) as MONTH,
etc...

It works but I have a blank line on top of the file :(
image.png
If i do set heading off, it removes the blank row but also the header row....
Do you have a solution to remove this blank row on top of the CSV file with SQLPLUS in this context ?
Thank you...

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 30 2023
Added on Jan 27 2021
11 comments
7,200 views