Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01400: cannot insert NULL into ??? Problem with 'int'?
On 24 Nov 2002 12:20:41 -0800, rdalfonso_at_nyc.rr.com (Rich D) wrote:
>I seem to be getting a problem whenever I do an insert. It happens if
>the datatype of the column is 'int' or 'number' or 'numeric'.
>
>The error I get is :
>ORA-01400: cannot insert NULL into
>("SYSTEM"."My_TABLE_NAME"."INTEGER_COLUMN")
>
>If I alter the table and change the columns datatype to char it works.
>Why does this error always happen on fields that are 'int' or
>'number'?
>
>Its driving me crazy.
>
>Am I using the wrong datatype for Oracle?
You won't get any sensible replies without supplying the table
definition and the failing insert statement.
ORA-1400 usually occurs when you have a NOT NULL (mandatory) column,
and you try to insert NULL into it.
In your case you might have type conversion problems: you are
supplying an empty string, which doesn't get converted to the number
0. But then again, you supply way too little clues, and crystall balls
have sold out here.
Regards
Sybrand Bakker, Senior Oracle DBA
To reply remove -verwijderdit from my e-mail address Received on Sun Nov 24 2002 - 15:20:44 CST