-
Sql Loader problem
Hello all
I am doing a bulk load using a pipe delimited flat file. Following is my control file content:
Code:
LOAD DATA
INFILE '/home/oracle/Load/data1.txt'
INTO TABLE MSGEM
FIELDS TERMINATED BY '|' optionally enclosed by "'" TRAILING NULLCOLS
(
PC, NAME, MSG1,MSG2, EMNO, CDE94, USP, NARCD, ASPCD, MNOS
)
I am getting problem here in loading texts with quotes.
E.g., Oracle's, Drug's etc.
Could somebody explain how can I escape these quotes in my data file as it is throwing out error for all the records with quotes.
Also I tried with External Table option. It throws following error message.
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-30653: reject limit reached
ORA-06512: at "SYS.ORACLE_LOADER", line 52
I think it has to do with the same issue.
Thanks in advance.
gtcol
-
You have specified... optionally enclosed by "'" ; do you really have fields enclosed by "'"?
-
Hi PAVB,
I haven't enclosed any field with " ' ". I was trying out different options to escape this character; thought may be this could help. But nothing helped; with or without this option, couldn't get things loaded. Please advise.
Thanks
gtcol
-
Okay... lets talk about SQL*Loader.
Since you do not have fields enclosed by "'" I would take out the "optionally enclosed by" clause and run it again then... look at the log.
-
sqlldr has a parameter "errors". Do you specify any value to this parameter?
-
Hello all
I apologize for replying this late. I was out on site for few days. well, for the issue, its fixed now. It was this carriage return(chr(13)) appened at the end of last line of the data file which was causing the script to fail. I used regexp_replace to replace it with nothing ('') :) :) . The script works just fine now.
Thanks PAVB, Tamilselvan for great input,
gtcol