Oracle loading errors [message #70099] |
Fri, 12 April 2002 10:38 |
Sue
Messages: 49 Registered: May 2000
|
Member |
|
|
Hi
I have a comma delimited text file I am loading into Oracle with the help of SQLLoader. Some fields in some records have commas inside the data. Will this be considered as a delimiter? How do I take care of these commas inside the data?
Desperately needing help!
Sue
|
|
|
Re: Oracle loading errors [message #70102 is a reply to message #70099] |
Mon, 15 April 2002 02:18 |
Sujit Mahapatra
Messages: 19 Registered: March 2002
|
Junior Member |
|
|
There should be a proper way of getting the file
where there are commas in teh data and the delimiter
itself is also a comma. You have to use an optional 'enclosing character' like a double
quotes (").
The ctl file should look like:
LOAD DATA
INFILE SUJ.DAT
REPLACE INTO TABLE
SUJ_TAB
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
(
FIELDS..
......
......
)
If you save an XLS file in CSV format, it automatically
encloses the data with comma enclosed within
double quotes.
Cheers,
Sujit
|
|
|