Solved

SQL Loader - Tab delimited

Posted on 2001-06-29
6
2,922 Views
Last Modified: 2011-09-20

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.
0
Comment
Question by:jyhuang
6 Comments
 
LVL 3

Accepted Solution

by:
myerpz earned 50 total points
ID: 6238254
While editing the control file, I entered a tab
between the quotes after 'terminated by' and
that worked for me.

Hope this helps.
0
 
LVL 1

Expert Comment

by:dbrower
ID: 6238293
One of these should work

FIELDS TERMINATED BY WHITESPACE


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

Good luck
0
 
LVL 1

Expert Comment

by:bkm
ID: 6238320
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 34

Expert Comment

by:Mark Geerlings
ID: 6238372
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
 
LVL 3

Expert Comment

by:jaramill
ID: 6239128
Also add after each column

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

Gio
0
 
LVL 1

Author Comment

by:jyhuang
ID: 6239244
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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now