SQLLDR csv input file [message #109196] |
Tue, 22 February 2005 18:56 |
ghuebner
Messages: 2 Registered: February 2005 Location: Chicago
|
Junior Member |
|
|
I have created a csv form file the first column has several zeros infront of the number. Oracle is stripping off the leading zeros.
after control file is input through sqlldr it looks like
12345678
Create table test1(
SERIAL_NUMBER VARCHAR2(255) NOT NULL,
MODEL_NAME VARCHAR2(255) NOT NULL,
LOCATION VARCHAR2(255) NOT NULL,
HIST_DATE DATE NOT NULL,
Control file for sqlldr is
load data
infile 'c:\test\seialnumber.csv
append into table test1
FIELDS TERMINATED BY ','
(HIST_DATE DATE "DD-MM-YY",
SERIAL_NUMBER CHAR,
MODEL_NAME CHAR,
LOCATION CHAR
)
csv File
00012345678, test, CHICAGO,2/1/2005
|
|
|
Re: SQLLDR csv input file [message #109211 is a reply to message #109196] |
Tue, 22 February 2005 21:51 |
|
Barbara Boehmer
Messages: 9101 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
Your control file does not match your csv file. Your columns are in different order and your date format is different. The elimination of the leading zeroes would typically happen if you are loading into a number column, not a varchar2 column.
|
|
|