Home » RDBMS Server » Server Utilities » sqlldr errors
sqlldr errors [message #258109] Fri, 10 August 2007 04:59 Go to next message
gram77
Messages: 3
Registered: August 2007
Junior Member
I have null values to be inserted into a table whose column is created as NOT NULL.

How do i go about it?

Here is the sqlldr log:

Record 1: Rejected - Error on table XYZ.
ORA-01400: cannot insert NULL into ("XYZ"."MER_CDE")

Record 2: Rejected - Error on table XYZ.
ORA-01400: cannot insert NULL into ("XYZ"."MER_CDE")

Record 3: Rejected - Error on table XYZ.
ORA-01400: cannot insert NULL into ("XYZ"."MER_CDE")

Data:
0096741168826|A|0200001|A XMAS |CHR CROO | |01|002|Y|0|C |280|2000|2030|4000|12479|LDL|CD |NA |00005.25|00012.98|009.93|N|030|001.2|00000000.50000|05.000|05.500|00.500|N|20070801|RR| | |A|R|20070521|2725|2725|20070521|A| |084|1|001| | |

0096741169021|A|0200002|C XMAS |COU CHR VOL | |01|002|Y|0|C |280|0300|0330|4000|12479|LDL|CD |NA |00005.25|00012.98|009.93|N|030|001.2|00000000.50000|05.000|05.500|00.500|N|20070801|RR| | |A|R|20070521|2725|2725|20070521|A| |084|1|001| | |

0049656513472|A|0200003|C |XM073 | |01|002|Y|0|C |280|3000|2030|6000|02001|LDL|397 |CD |00000.90|00004.98|003.97|N|030|001.2|00000000.50000|05.000|05.500|00.500|N|20070307|NR| | |A|R|20070502|2725|2725|20070502|A| |084|1|001| | |

0049656513489|A|0200004|C |XM076 | |01|002|Y|0|C |280|3000|2030|6000|02001|LDL|687 |CD |00002.75|00006.98|006.92|N|030|001.2|00000000.50000|05.000|05.500|00.500|N|20070307|NR| | |A|R|20070502|2725|2725|20070502|A| |084|1|001| | |

0018111770422|A|0200005|C |FROSTY | |01|002|Y|0|C |280|0700|0730|6000|04630|LDL|18111|76104 |00003.30|00007.99|006.93|N|030|001.2|00000000.50000|05.000|05.500|00.500|N|20070529|RR| | |A|D|20070502|2725|2725|20070502|A| |084|1|001| | |


MER_CDE is 6th column from right.

while creating the table, the following columns shown under have been created as NOT NULL.

While in the data in these columns may have a null value.

For Example MER_CODE column has null values in the sample data shown below

MER_CDE VARCHAR2(30) NOT NULL, --null values in data
PRD_LNE VARCHAR2(40) NOT NULL, --may have null values in data
CLS_CDE VARCHAR2(40) NOT NULL, --may have null values in data
CTG_IND VARCHAR2(40) NOT NULL,
FOR_CDE VARCHAR2(40) NOT NULL,
SHP_CDE VARCHAR2(40) NOT NULL,

Q Should i disable all constraints in the table, and load all data through sqlldr and then enable the constraints?
Re: sqlldr errors [message #258125 is a reply to message #258109] Fri, 10 August 2007 06:10 Go to previous messageGo to next message
user82
Messages: 49
Registered: June 2006
Location: Romania
Member
Modify the columns so that to accept null values:
alter table XYZ modify MER_CDE null;

.....
Re: sqlldr errors [message #258133 is a reply to message #258125] Fri, 10 August 2007 06:26 Go to previous message
gram77
Messages: 3
Registered: August 2007
Junior Member
I will use novalidate option
Previous Topic: How to Replace 0?
Next Topic: Problems with DATAPUMP EXP
Goto Forum:
  


Current Time: Sat Jun 22 21:39:05 CDT 2024