Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SQL*Loader generating newlines when last record < fixed length

SQL*Loader generating newlines when last record < fixed length

From: Holger Linge <holger.linge_at_kalorimeta.de>
Date: 4 Nov 2005 03:27:15 -0800
Message-ID: <1131103635.730355.113840@g47g2000cwa.googlegroups.com>


Hi

I'm loading a file of fixed length records for further parsing. From time to time, the last record may be shorter than defined in the loaderfile. If so, the loader fills the remaining space with newline characters = chr(10).

This is my loaderfile:

OPTIONS (DIRECT=FALSE,ERRORS=0) LOAD DATA INFILE 'xxx.in' "fix 130"
BADFILE 'xxx.bad'
APPEND PRESERVE BLANKS INTO TABLE MY_RECORDS ( CONTENT position (1:130) char,
RECORD_ID "RECORD_SEQ.NEXTVAL",
ORDER_SEQ sequence)

As you see the expected record-length is 130 characters.

Now, the last record in my infile is 61 chars long. When i start the loader is creates a record with 69 newline-characters added. 61 chars regular content + 69 newlines = 130

Can i stop the loader creating newlines out of nothing? I did not find the behaviour descibed in the documentation.

This leaves me puzzled

cu
Holger Received on Fri Nov 04 2005 - 05:27:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US