Home » RDBMS Server » Server Utilities » Oracle loading errors
Oracle loading errors [message #70099] Fri, 12 April 2002 10:38 Go to next message
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 Go to previous message
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
Previous Topic: Re: OCP Exam Papers
Next Topic: sqlloader did not run when schedule at the crontab
Goto Forum:
  


Current Time: Thu May 02 20:23:13 CDT 2024