日期:2014-05-17  浏览次数:21269 次

ORA-01722
执行SQL语句时报的错误,SQL如下:
insert into portal_sync_dpt_recorder (id,ou, ctOrgType, name, displayname, ctInitial, description, mail, postalAddress, postalCode, l, 
ctBusinessCategory, ctOrgManager, ctViceManager, ctOrder, ctSupervisorydepartment, ctReportingdepartment, ctStatus,sendTime, changetype,insertTime, dealstatus) 
values (seq_portal_sync_dpt_recorder.nextval,'2915120000','2','济南财务部','济南财务部','','山东-济南财务部','','','','山东-济南','','wangysh','weiyupeng',' ',
'ouu003d2915000000,cnu003dorganizations,DCu003dsd,DCu003dctc,DCu003dCOM','2915000000','1',to_timestamp('2011-11-10 10:24:12','yyyy-mm-dd hh24:mi:ss.ff3') ,
'update',to_timestamp('2011-11-16 14:28:11','yyyy-mm-dd hh24:mi:ss'),0)

执行SQL的时候报了ora-01722错误,说标红的地方为无效数字,其对应的字段为varchar2类型,请大侠们指教

------解决方案--------------------
那个是什么数字?
------解决方案--------------------
自己解决了也要说个原因吧
------解决方案--------------------
ctSupervisorydepartment字段是varchar2类型的吗?
怎么解决的?说来大家也了解下
------解决方案--------------------
凑个热闹,呵呵。
------解决方案--------------------
CREATE TABLE PORTAL_SYNC_DPT_RECORDER (ID VARCHAR2(100),OU VARCHAR2(100), CTORGTYPE VARCHAR2(100), NAME VARCHAR2(100), DISPLAYNAME VARCHAR2(100), CTINITIAL VARCHAR2(100), DESCRIPTION VARCHAR2(100), MAIL VARCHAR2(100), POSTALADDRESS VARCHAR2(100), POSTALCODE VARCHAR2(100), L VARCHAR2(100), 
CTBUSINESSCATEGORY VARCHAR2(100), CTORGMANAGER VARCHAR2(100), CTVICEMANAGER VARCHAR2(100), CTORDER VARCHAR2(100), CTSUPERVISORYDEPARTMENT VARCHAR2(100), CTREPORTINGDEPARTMENT VARCHAR2(100), CTSTATUS VARCHAR2(100),SENDTIME VARCHAR2(100), CHANGETYPE VARCHAR2(100),INSERTTIME VARCHAR2(100), DEALSTATUS VARCHAR2(100))


insert into portal_sync_dpt_recorder (id,ou, ctOrgType, name, displayname, ctInitial, description, mail, postalAddress, postalCode, l, 
ctBusinessCategory, ctOrgManager, ctViceManager, ctOrder, ctSupervisorydepartment, ctReportingdepartment, ctStatus,sendTime, changetype,insertTime, dealstatus) 
values (1,'2915120000','2','济南财务部','济南财务部 ','','山东-济南财务部','','','','山东-济南','','wangysh','weiyupeng',' ',
'ouu003d2915000000,cnu003dorganizations,DCu003dsd,DCu003dctc,DCu003dCOM','2915000000','1',to_timestamp('2011-11-10 10:24:12','yyyy-mm-dd hh24:mi:ss.ff3') ,
'update',to_timestamp('2011-11-16 14:28:11','yyyy-mm-dd hh24:mi:ss'),0)

1 行已插入。

照抄你的sql也能正常执行,没有任何问题
------解决方案--------------------
很简单,字符类型不相符~
------解决方案--------------------
没看出为什么,难道因为逗号