Home » RDBMS Server » Server Utilities » SQLLDR and blank interpreted as NULL?
SQLLDR and blank interpreted as NULL? [message #69847] Wed, 13 March 2002 09:14 Go to next message
Bill Hartenberger
Messages: 2
Registered: March 2002
Junior Member
Good morning,
I'm loading a custom Oracle staging table(ver. 8.1.7.0)and I have a 1 byte field that could be blank or an a/n. The field populates a column in my table that is part of a composite primary key, (therefore NOT NULL is imposed on it). When SQLLDR is executed from Windows 2000 platform I receive - Rejected - Error on table SOURCE_WS_INVOICE_DTL_STG.
ORA-01400: cannot insert NULL into ("HBS_DEV"."SOURCE_WS_INVOICE_DTL_STG"."FLD04_LOG_GRADE").
I've tried NULLIF, DEFAULTIF, in the .ctl file, I've set a deafault of blank on the database column???? Both the declaration in the .ctl file and the column are CHAR. Please see the .ctl attached and thank you for any assistance.
LOAD DATA
INFILE 'E:Data Retention and ArchiveArchive Billing and Scaling MVS WR3092MVS DATAWS_INVOICE_DTL.DAT'
APPEND

INTO TABLE SOURCE_WS_INVOICE_DTL_STG

(
FLD01_INVOICE_NUMBER POSITION(1:7) CHAR,
FLD02_CANCELLATION_IND POSITION(8:8) CHAR,
FLD03_HBS_TREE_SPECIES POSITION(9:10) CHAR,
FLD04_LOG_GRADE POSITION(11:11) CHAR,
FLD05_WEIGHT_REF_NUMBER POSITION(12:12) CHAR,
FLD06_ADDITIONAL_VOLUME POSITION(57:68) CHAR,
FLD07_ADDITIONAL_AMOUNT POSITION(79:88) CHAR,
FLD08_BONUS_AMOUNT POSITION(89:98) CHAR,
FLD09_DEV_LEVY_AMOUNT POSITION(99:108) CHAR,
FLD10_SILV_LEVY_AMOUNT POSITION(109:118) CHAR,
SOURCE_YEAR CONSTANT 1988,
SOURCE_ID SEQUENCE(MAX,1),
SST_FK13_SOURCE_STATUS_TYPE_ID CONSTANT 6
)
Thanks Bill
Re: SQLLDR and blank interpreted as NULL? [message #69853 is a reply to message #69847] Wed, 13 March 2002 12:52 Go to previous message
Bill Hartenberger
Messages: 2
Registered: March 2002
Junior Member
As is sometimes the way I've just resolved my own problem. I finally found the syntax for sqlldr and added a "NVL(:FLD04_LOG_GRADE, ' ')" line to the control file and all my problems went away.

Thanks anyways
Bill
Previous Topic: Importing user in different tablespace on another server
Next Topic: Create index with a new user?
Goto Forum:
  


Current Time: Thu Apr 25 14:24:33 CDT 2024