SQL Loader - Tab delimited


I want to use sql loader to load a tab delimited files. How do I specify "TAB" in the sql loader control file? What do I put in the "???" in the line below?

FIELDS TERMINATED BY "???" OPTIONALLY ENCLOSED BY '"'

Thanks.
LVL 1
jyhuangAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
myerpzConnect With a Mentor Commented:
While editing the control file, I entered a tab
between the quotes after 'terminated by' and
that worked for me.

Hope this helps.
0
 
dbrowerCommented:
One of these should work

FIELDS TERMINATED BY WHITESPACE


FIELDS TERMINATED BY '    '
where the space between the quotes is a Tab

Good luck
0
 
bkmCommented:
Hope this helps!!

LOAD DATA
INFILE 'files.txt'
INTO TABLE files
INSERT
FIELDS TERMINATED BY X'09' TRAILING NULLCOLS
(ID_FILE,
NATION,
PATENT,
TITLE,
HKEY)

Another Eg:

LOAD DATA

   INFILE 'FILENAME.TXT'

   INTO TABLE t1

   FIELDS DELIMITED BY x'09'

   TRAILING NULLCOLS

     ( column 1....

     )

0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Mark GeerlingsDatabase AdministratorCommented:
Since "chr(09)" works to insert a tab character, it may work in SQL*Loader as well (but I haven't tried it) like this:
FIELDS TERMINATED BY chr(09)
0
 
jaramillCommented:
Also add after each column

(column_name1   datatype TERMINATED BY X'09',
 column_name2   datatype TERMINATED BY X'09')

Gio
0
 
jyhuangAuthor Commented:
Thank you all for your responses. Almost all your suggestions are working. I can use space, tab, or X'09'. But since myerpz is the first one who gave the correct answer, I am giving the points to him/her.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.