escape double-quotes in sqlldr [message #234474] |
Tue, 01 May 2007 13:26 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ozzy80
Messages: 55 Registered: June 2005
|
Member |
|
|
Hello,
My data file has double-quotes (") and single-quotes (') in it. They represent IN and FT, respectivily.
I tryed using the REPLACE function in the control file, but the getting error with the double-quote...
Sample data from data file:
:116780:,:2"X12"-14' DF/L #2&BTR S-DRY S4S:,:
Contril file:
LOAD DATA
CHARACTERSET 'UTF8'
LENGTH SEMANTICS CHAR
INFILE 'd:\batch\data\ITEM.dat'
BADFILE 'd:\batch\data\ITEM.bad'
DISCARDFILE 'd:\batch\data\ITEM.dsc'
APPEND INTO TABLE ITEM
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY ':'
TRAILING NULLCOLS
(ITEM
,DESCR "replace(replace(:DESCR,'"','IN'),'''','FT')"
)
Error:
SQL*Loader: Release 10.2.0.1.0 - Production on Tue May 1 14:24:43 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL*Loader-350: Syntax error at line 19.
Expecting "," or ")", found ",".
,DESCR "replace(replace(:DESCR,'"','IN'),'''','FT')"
^
Please let me know how can I achieve this in the control file.
Let me know if you have any questions.
Thanks,
~Ozzy
|
|
|
|
|