Skip to Main Content

Oracle Database Discussions

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!

Spool colsep as ascii character

maldrich12Jun 9 2020 — edited Jun 10 2020

Hi,

I would like to spool a file from a table in Oracle and use CTRL-Y as the colsep in my script:

set pagesize 0

set linesize 5000

set trimspool on

set wrap off

set colsep x'19'

set head off

set verify off

set feedback off

set termout off

alter session set nls_date_format = 'YYYYMMDD';

spool test.txt;

select * from <tablename>;

spool off;

Using sqlldr, I can load data from files separated by ^Y using x'19' :

FIELDS TERMINATED BY x'19'

Is this possible?

This post has been answered by Gaz in Oz on Jun 10 2020
Jump to Answer
Comments
Post Details
Added on Jun 9 2020
7 comments
954 views