Click to See Complete Forum and Search --> : oracle load data
sunoracle
08-11-2003, 04:58 PM
What is the best way to load a delimited spreadsheet with 10 fields to an oracle table. One of these fields have 2000 to 3500 characters associated with it.
I've tried sqlldr, but it bombs with the following message:
"field in data file exeeds the maximum length"
Any help would be greatly appreciated.
balajiyes
08-11-2003, 05:33 PM
can u paste a sample record from FILE
and ur sql-loader
Cheers!
Sqlldr should work just fine for this, you didn't say what version you are running but I just tried this on a 9.0.1 box.
Here's an example control file that will load into a table with a column of varchar2(4000).
load data
infile 'a.csv'
badfile 'a.bad'
discardfile 'a.dsc'
replace
into table a
fields terminated by "," optionally enclosed by '"'
(x,
y char(4000)
)
All the details and lots of examples of using sqlldr are in the
utilities documentation.
--
Paul
sunoracle
08-11-2003, 08:02 PM
Guys,
Thanks a bunch for your replies. Paul, works like a charm.
Thanks a bunch.
Can someone point me in the right direction to start the OCP Certifdication Track?
Thanks again
sunoracle
08-11-2003, 08:26 PM
Paul,
Another question, What if I have the same table with 10 fields, but I have one field in the table that contains more than 4000 characters.
What would be my best alternative then? Could you point me in the right direction in defining this table with the clob/blob datatypes. Also, because I'm now using the clob/blob data types, how will I load the content to my oracle table?
Thanks again.