Home » RDBMS Server » Server Utilities » SQLLDR csv input file
SQLLDR csv input file [message #109196] Tue, 22 February 2005 18:56 Go to next message
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 Go to previous message
Barbara Boehmer
Messages: 9097
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.
Previous Topic: Which takes longer?
Next Topic: SQLLDR- 12 lakh rows into a table
Goto Forum:
  


Current Time: Wed Jul 03 08:36:31 CDT 2024