sqlldr (trim off a string) [message #69012] |
Mon, 15 October 2001 07:23 |
Gloria Zhao
Messages: 11 Registered: October 2001
|
Junior Member |
|
|
Hi there,
I have a first_name field in my table as varchar(20). However, in data file, the field may exceed the length and will cause error in sqlldr process. I am wondering if I could trim the string into 20 char length in sqlldr control file? I would appreciate it if you could please let me know.
Thanks a lot in advance.
Gloria
----------------------------------------------------------------------
|
|
|
Re: sqlldr (trim off a string) [message #69013 is a reply to message #69012] |
Mon, 15 October 2001 10:56 |
Suresh Vemulapalli
Messages: 624 Registered: August 2000
|
Senior Member |
|
|
write control file like below
LOAD DATA
INFILE 'ss.TXT'
APPEND
INTO TABLE sample
FIELDS TERMINATED BY ","
optionally enclosed by '"'
(col1 char "substr(:col1,1,20)",
col2 char)
----------------------------------------------------------------------
|
|
|