English

Error: ORA-01400: cannot insert into" table when loading into Oracle

Error Message

While copying, pasting or loading a feature class or table from a non-Oracle geodatabase into Oracle, the following error is returned:

"Underlying RDBMS error [ORA-01400: cannot insert into ("TB","MYTABLE","MYFIELD")]"

Cause

This error can occur when there are zero-length ('') strings in a table field. These are valid in a file geodatabase, personal geodatabase and most supported RDBMS, such as SQL Server, Informix, DB2, and PostgreSQL, but are interpreted as NULLs in Oracle. When using copy/paste or any data-loading tool, records containing '' (zero-length) strings are rejected if the field is flagged to not allow NULLs.

Solution or Workaround

Replace all occurrences of zero-length strings in the text fields with ' ' (a quoted blank space).

Use the following WHERE clauses to select the zero-length strings and then update the field values to a quoted single space (' ').

File Geodatabase:
CHAR_LENGTH(myfield) = 0

Personal Geodatabase:
LEN(myfield) = 0

SQL Server:
DATALENGTH(myfield) = 0

DB2:
LENGTH(myfield) = 0

Informix:
CHAR_LENGTH(myfield) = 0

PostgreSQL:
CHAR_LENGTH(myfield) = 0