Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> SQL*Loader Question
I've got an MS Access table that I need to load into Oracle. I have the table in Oracle created, but I can't seem to load the table. I think that the problem is that some of the fields in the Access table contain carriage returns, and I can't quite figure out how to make SQL Loader understand that these are not the end of a record. However, the end of each record *IS* marked by a carriage return. I've tried using "str '|\n'" but that doesn't seem to work, since the last character of each record is not a vertical bar. I've also tried using "str '\"\n'"' but that failed as well. I keep getting an error message in my log file reading, "Record 1: Rejected - Error on table TBLCOURSE, column XDESC. Field in data file exceed maximum length". And though there are 54 records in the table, it gave me only this error message and did not load any records at all.
Thus my dilemma.
Here is my ctl script:
load data
infile 'tblCourses.txt' "str '\n'"
badfile 'tblCourses.bad'
replace
into table tblCourses
fields terminated by '|'
(
xID, xxnumber, xname, xdesc, xstatus, xtechreqs, xunits, tid, did, rid, xurl, xemail, xprereq, xesend, xactive, xoffer