Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sqlldr problem
In article <5T4y7.19539$U97.104834_at_NewsReader>, "Neil says...
>
>Could anyone help me please? I'm trying to load data originally obtained
>from an Informix database from an ASCII table.
>
>One of the fields has a blank in it. Every row is rejected with the
>message: "Field in data file exceeds maximum length"
>
>I'm baffled!
>
>thanks
>Neil
>
>---------------------- .ctl file -----------------------------------
>load data
>infile '/scratch/crap.uld'
>badfile '/home/oracle/dsinvlines.bad'
>insert into table dsinvlines
>fields terminated by '|'
>(
> company smallint ,
> vendor_num char(9) ,
> batch_num integer ,
> invoice char(22) ,
> seq_nbr smallint ,
> product_num char(30) ,
> line_desc char(40) ,
> unit_order decimal(12,3) ,
> quantity_inv decimal(12,3) ,
> unit_meas char(6) ,
> list_price decimal(14,4) ,
>...
since all of your input data is character strings -- you should be using the char type for all columns. I just loaded your data successfully using:
load data
infile *
replace
into table dsinvlines
fields terminated by '|'
(
company ,
vendor_num ,
batch_num ,
invoice ,
seq_nbr ,
product_num ,
line_desc ,
unit_order ,
quantity_inv ,
unit_meas ,
list_price
)
begindata
1|KE0122|85457|LN2008381Y|9|23419|MATT PREM BAKED HAM
100G|1.0|2.0||0.0|1.215|0.0|2.43|Z|0.0|0.0|0.0|0. 0|0.0|0.0|0.0| | | |1|KE0122|85457|LN2008381Y|10|23417|MATT PREM SMOKED HAM 100G|1.0|2.0||0.0|1.215|0.0
-- Thomas Kyte (tkyte@us.oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Sun Oct 14 2001 - 09:32:56 CDT
![]() |
![]() |