ORA-01400: cannot insert NULL into (string) ora error ora 01400
FranklinFaces.com
FranklinFaces.com - Oracle & SQL Server Database Forums for all IT Professionals
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



ORA-01400: cannot insert NULL into (string)... Expand / Collapse
Message
Posted 6/15/2010 4:57:21 PM Post #400
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
ORA-01400:cannot insert NULL into (string)

ora 01400

ORA-01400:cannot insert NULL into (string)
Cause:An attempt was made to insert a NULL into the column "USER"."TABLE"."COLUMN".

For example, if you enter:


connect scott/tiger create table a (a1 number not null); insert into a values (null);

Oracle returns:


ORA-01400 cannot insert NULL into ("SCOTT"."A"."A1") : which means you cannot insert NULL into "SCOTT"."A"."A1".
Action:Retry the operation with a value other than NULL.

Posted 6/15/2010 4:58:19 PM Post #401
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
Oracle/PLSQL: ORA-01400 Error  ora 01400

Error:

ORA-01400: cannot insert NULL into ("SCHEMA"."TABLE_NAME"."COLUMN_NAME")

Cause:

You tried to insert a NULL value into a column that does not accept NULL values.

Action:

The options to resolve this Oracle error are:
  1. Correct your INSERT statement so that you do not insert a NULL value into a column that is defined as NOT NULL.

For example, if you had a table called suppliers defined as follows:

CREATE TABLE suppliers
(supplier_idnumbernot null,
supplier_namevarchar2(50)not null );

And you tried to execute the following INSERT statement:

INSERT INTO suppliers
( supplier_id )
values
( 10023 );


You would receive the following error message:

You have defined the supplier_name column as a NOT NULL field. Yet, you have attempted to insert a NULL value into this field.

You could correct this error with the following INSERT statement:

INSERT INTO suppliers
( supplier_id, supplier_name )
values
( 10023, 'IBM' );

Now, you are inserting a NOT NULL value into the supplier_name column.

Posted 6/15/2010 4:59:06 PM Post #402
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

ORA-01400: cannot insert NULL into <tablename>

ora 01400  This error is thrown if someone tries to insert a null into a column that has a not null constraint.
create table ora_01400 (  foo number not null,  bar number not null,  baz number not null);
insert into ora_01400 values (1, null, 3);
ERROR at line 1:ORA-01400: cannot insert NULL into ("RENE"."ORA_01400"."BAR")
Posted 6/15/2010 5:02:43 PM Post #403
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

ORA-01400: cannot insert NULL error when importing data ora 01400

I exported a table that has blank (ie a single space) data in a column which is defined a not null.

When I try to import these data into a table I get the
error
ORA-01400: cannot insert NULL into ("SSYS"."PS_ACAD_PROG_TBL"."AMS_PROG_TYPE_GRP"

It looks like that the data that were blank in the export file is treated as NULL.

 

« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: silencer

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 10:10am

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0.062. 8 queries. Compression Disabled.
Contextual Links