Home » SQL & PL/SQL » SQL & PL/SQL » SQlloarder trailing nullcols option
SQlloarder trailing nullcols option [message #19904] Wed, 17 April 2002 07:09 Go to next message
Joan
Messages: 36
Registered: February 2002
Member
I have control file with trailing nullcols option
My data file has some missing records in the middle and then one records at the end. I am getting errors loading the files.
eg 1 2 3 4 7
How does the trailing nulcols option works. the file is tab separated . You can't have field missing in the middle of the records?
Re: SQlloarder trailing nullcols option [message #19906 is a reply to message #19904] Wed, 17 April 2002 08:15 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
TRAILING NULLCOLS tells SQL*Loader to treat any relatively positioned columns that are not present in the record as null columns.

For example, if the following data

10 Accounting

is read with the following control file

INTO TABLE dept
TRAILING NULLCOLS
( deptno CHAR TERMINATED BY " ",
dname CHAR TERMINATED BY WHITESPACE,
loc CHAR TERMINATED BY WHITESPACE
)
Re: SQlloarder trailing nullcols option [message #19920 is a reply to message #19904] Thu, 18 April 2002 06:20 Go to previous messageGo to next message
André ALIMBA
Messages: 16
Registered: April 2002
Junior Member
The TRAILING NULLCOLS clause causes SQL*Loader to treat any fields that are missing at the end of a record as null.
If the last field does not contain data, during the loading (inserting data), this clause (TRAILING NULLCOLS) says to load a 'null value'.
IF the last field is not present for every record, this clause says to load a null value instead of rejecting the record when the number of data values is less than the number of fields define in the control file (xxxx.CTL).
IF TRAILING NULLCOLS is not specify, all recordswith no data for the last field are going to be rejected.

Source : SQL*LOADER Control File Reference (OnLine Doc).

Other :
If you loose some records, verify if you are inserting null value in the field define not null.

In your sqlldr commande, try to use the log clause ...
André ALIMBA, Chef de Projet BEAC (Cameroun).
Re: SQlloarder trailing nullcols option [message #20720 is a reply to message #19904] Fri, 14 June 2002 22:34 Go to previous message
Agilan
Messages: 1
Registered: June 2002
Junior Member
check it out

http://download-west.oracle.com/otndoc/oracle9i/901_doc/server.901/a90192/ch05.htm
Previous Topic: SELECT COUNT
Next Topic: CLOB variable
Goto Forum:
  


Current Time: Mon May 20 13:56:13 CDT 2024