用户名:   自动登录 找回密码
密   码:    * 注册




发表新帖 回复这个主题  [ 1 篇帖子 ] 
作者 内容
 文章标题 : IMP ORA-01400: cannot insert NULL into
帖子发表于 : 2012-08-12 0:04 
离线
头像

注册: 2011-05-01 9:15
帖子: 120
在全库导入时遇到ORA-01400: cannot insert NULL into ,解决思路是在导入之前先创建那张表,且将报错的字段去掉not null 约束,再导入,导入之后找到那个为null的数据,要么delete要么update,再把not null约束加上去,OK。


. . importing table "COREPROCESS_REAL_TIME_STOCK"
IMP-00019: row rejected due to ORACLE error 1400
IMP-00003: ORACLE error 1400 encountered
ORA-01400: cannot insert NULL into ("DBAUSERPSZX_001"."COREPROCESS_REAL_TIME_STO
CK"."ZHBHSJJ")
Column 1 01570
Column 2 1
Column 3 0000
Column 4 14.0000010
Column 5 .00033.9......
Column 6 .....xn...7...
Column 7 .
Column 8 1
Column 9 0
Column 10 0
Column 11
Column 12 13-%M/%D/%Y-9303:15:37:59
Column 13 230
Column 14 0
Column 15 1
Column 16 0
Column 17 0
Column 18 0
Column 19 .
Column 20 0
Column 21 0
Column 22 -5.353535352535200E+29
Column 23 #
Column 24 0
Column 25 0

SQL> drop user dbauserpszx_001 cascade;

User dropped

SQL> create user ``````
SQL> grant
SQL> conn dbauserpszx_001/`````
create table COREPROCESS_REAL_TIME_STOCK
(
COM_CODE VARCHAR2(13) not null,
SPLB CHAR(1) not null,
MC VARCHAR2(15) not null,
DZXL VARCHAR2(15) not null,
GZ VARCHAR2(15) not null,
GYS VARCHAR2(15) not null,
JYFS CHAR(1) not null,
JXTAX NUMBER not null,
XXTAX NUMBER not null,
ZHHSJJ NUMBER not null,
ZHBHSJJ NUMBER , --把not null 先去掉
ZHJHRQ DATE not null,
KL NUMBER not null,
ZKFD NUMBER,


C:\Documents and Settings\Administrator>imp DBAUSERPSZX_001/phoenixdba@pszx_db
buffer=10240000 ignore=y log=d:\001.log file=D:\dbauserpszx_001_20120811_2\dbaus
erpszx_001_20120811_2.dmp FULL=Y



select * from coreprocess_real_time_stock t where ZHBHSJJ is null
附件:
Image1.png
Image1.png [ 26.23 KiB | 被浏览 26715 次 ]

delete from coreprocess_real_time_stock t where ZHBHSJJ is null
附件:
Image2.png
Image2.png [ 40.02 KiB | 被浏览 26715 次 ]


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 1 篇帖子 ] 


在线用户

注册用户: 没有注册用户


查找:
前往 :  
cron
Powered by OraSql © 2011, 2012, oracle_awen