Click to See Complete Forum and Search --> : sql loader


votey
07-12-2002, 04:02 PM
Hi,
I'm stuck in loading large text data into database. My table is:

SQL> describe temptable
Name Null? Type
----------------------------------------- -------- -------------
DOCNO VARCHAR2(32)
DOCID NOT NULL VARCHAR2(32)
TTL VARCHAR2(256)
CONTENT CLOB

The content of my control file is:
LOAD DATA
INFILE 'tempdata.txt'
APPEND INTO TABLE temptable
FIELDS TERMINATED BY '|'
(docno, docid, ttl, content)

The content of tempdata.txt:
CR93E-1|
E01AP3-1|
THE INTERSTATE CHILD SUPPORT ENFORCEMENT ACT --HON. MARGE ROUKEMA (Extension of Remarks - April 01, 1993)|
Mrs. ROUKEMA. Mr. Speaker, I am very pleased to be reintroducing today the Interstate Child Support Enforcement Act. This measure--which is also being reintroduced today in the other body by my colleague from New Jersey, Senator Bill Bradley--is based on the recommendations of the U.S. Commission on Interstate Child Support Enforcement. This bill is virtually the same bill that Senator Bradley and I introduced on October 1, 1992. This new and improved bill addresses the comments made pursuant to our initial bill by various States and organizations that have a stake in improving our child support enforcement system. As a commission member, I look forward to moving this comprehensive proposal forward.\n
Late last year, Mrs. Kennelly--who also served as a member of the Commission, and I authored a `Dear Colleague\' letter that was distributed to Members of this House together with the final report of the U.S. Commission on Interstate Child Support. Once again, I commend to my colleagues this comprehensive report: `Supporting Our Children: A Blueprint for Reform.\' I also ask my colleagues to support this bill to implement the Commission\'s recommendations to revamp our present ineffective system for interstate collection of child support. Certainly the issues that we are dealing with here are both complicated and difficult. Nevertheless, we must move this comprehensive interstate child support nforcement legislation through Congress at the earliest possible opportunity. Millions of our Nation\'s families--millions of children--are depending on us. We must not let them down.|

Afer I called sqlldr, no row is inserted, and got these in log file:
......
Record 1: Rejected - Error on table TEMPTABLE, column DOCID.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 2: Rejected - Error on table TEMPTABLE, column DOCID.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 3: Rejected - Error on table TEMPTABLE, column DOCID.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 4: Rejected - Error on table TEMPTABLE, column DOCNO.
Field in data file exceeds maximum length
Record 5: Rejected - Error on table TEMPTABLE, column DOCNO.
Field in data file exceeds maximum length

Table TEMPTABLE:
0 Rows successfully loaded.
5 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.

Space allocated for bind array: 66048 bytes(64 rows)
Read buffer bytes: 1048576

Total logical records skipped: 0
Total logical records read: 5
Total logical records rejected: 5
Total logical records discarded: 0
......

Please, if someone could help!
Thanks in advance!

Shestakov
07-12-2002, 05:52 PM
U have to use :
CONTINUEIF THIS (1) = '$' (or any symbol as u wish)
and u have to change ur datafile:

CR93E-1|
$E01AP3-1|
$THE INTERSTATE CHILD SUPPORT ENFORCEMENT ACT --HON. MARGE ROUKEMA (Extension of Remarks - April 01, 1993)|
$Mrs. ROUKEMA. Mr. Speaker, I am very pleased to be reintroducing today the Interstate Child Support Enforcement Act. This measure--which is also being reintroduced today in the $Millions of our Nation\'s families--millions of children--are depending on us. We must not let them down.|
CR000-X|
$EX...

votey
07-12-2002, 06:48 PM
Thank you a lot, but the result is unreasonably same. I also tried put the data in control file, and again :(

LOAD DATA
INFILE *
append
CONTINUEIF THIS(1)='$'
INTO TABLE temptable
FIELDS TERMINATED BY '|'
(docno, docid, ttl, content)
begindata
CR93E-1|
$E01AP3-1|
$THE INTERSTATE CHILD SUPPORT ENFORCEMENT ACT -- HON. MARGE ROUKEMA (Extension of Remarks - April 01, 1993)|
$Mrs. ROUKEMA. Mr. Speaker, I am very pleased to be reintroducing today the Interstate Child Support Enforcement Act.\n
This measure--which is also being reintroduced today in the other body by my colleague from New Jersey, Senator Bill Bradley--is based on the recommendations of the U.S. Commission on Interstate Child Support Enforcement. This bill is virtually the same bill that Senator Bradley and I introduced on October 1, 1992.|

Thanks!