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

相关信息
Article ID: 40255
Software:
ArcSDE 3.0, 3.0.1, 3.0.2, 3.0.2.1, 3.0.2.2, 8.0.1, 8.0.2, 8.1, 8.1.2, 8.2, 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1, 10, 10.1
ArcGIS - ArcEditor 8.1, 8.1.2, 8.2, 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1, 10
ArcGIS - ArcInfo 8.0.1, 8.0.2, 8.1, 8.1.2, 8.2, 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1, 10
ArcGIS Server (10.0 and prior) 9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 10
ArcGIS Engine Runtime 9.0, 9.0.1, 9.1, 9.2, 9.3, 9.3.1, 10
Platforms:
Windows XP, Server 2003, Vista, Server 2008, Windows 7

错误信息
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")]"

错误原因
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.
已邀请:

易智瑞技术支持

赞同来自:

解决方案
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




    创建及修改时间
    Created: 5/14/2012

    Last Modified: 5/16/2013
    原文链接
    http://support.esri.com/en/kno ... 40255

    要回复问题请先登录注册