Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: sqlloader - load records with quotes " "
It's a problem when any given construct serves multiple purposes in one
context. Probably some complex parsing alorithm would work, but I'm not too
skilled there.
For SQLLDR, you should be able to remove the OPTIONALLY ENCLOSED BY '"'
phrase and add a function to your control file to strip the quotes from the
fields you don't want them in. For the "jack "King" => jack "King" problem,
one might suggest adding an ltrim() in the control file, but I can't really
say without knowing what the rest of the data looks like. For instance,
"Sambo" Samuel would get butchered by the ltrim().
LOAD DATA
APPEND INTO TABLE testing
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
a
,b "replace ( :b ,'"' ,'' )"
)
Regards,
Jon Knight
Senior Database Analyst
2525 Horizon Lake Drive, Suite 120
Memphis, TN 38133
JKnight_at_concordefs.com
901.371.8000 - Phone 800.238.7675 - Phone 901.380.8336 - Fax www.FirstData.com
-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org]
On Behalf Of susan lam
Sent: Wednesday, February 09, 2005 1:01 PM To: Oracle-L_at_freelists.org Subject: sqlloader - load records with quotes " "
hi,
Is there a way to load the following records using
sqlldr?
"jack "King",","LEE"
The record should be loaded in the table as :
field1 - jack "King",
field2 - LEE
Control file:
LOAD DATA
APPEND INTO TABLE testing
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(a,b)
Data file format:
<field1>,<field2>
thanks.
susan
-- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-lReceived on Wed Feb 09 2005 - 14:38:38 CST
![]() |
![]() |