诡异的ORA-01722: invalid number
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in
--- The error occurred while applying a parameter map.
--- Check the outwhbill.insertDtlHis-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException: ORA-01722: invalid number
问题是:
1.更新了表结构,DTL表和DTL_HIS表,两个表的表结构相同.但位置不同,因为alter执行顺序问题?
SQL> desc TBL_DTL; Name Null? Type ----------------------------------------- -------- ---------------------------- VERSION NUMBER(10) MULTI_SELL VARCHAR2(2) EXPIRE_DATE_BEGIN VARCHAR2(40) EXPIRE_DATE_TO VARCHAR2(40) LVCARD_ID VARCHAR2(13) LVCARD_TYPE VARCHAR2(20) FR_ALERT_VAL NUMBER(10)
SQL> desc tbl__dtl_his; Name Null? Type ----------------------------------------- -------- ---------------------------- VERSION NOT NULL NUMBER(10) MULTI_SELL VARCHAR2(2) FR_ALERT_VAL NUMBER(10) EXPIRE_DATE_BEGIN VARCHAR2(40) EXPIRE_DATE_TO VARCHAR2(40) LVCARD_ID VARCHAR2(13) LVCARD_TYPE VARCHAR2(20)
insert into table_dtl_his (select * from table_dtl where BILL_NO=#billNo#);
insert into TBL_DTL_HIS (select VERSION,MULTI_SELL,FR_ALERT_VAL,EXPIRE_DATE_BEGIN,EXPIRE_DATE_TO,LVCARD_ID,LVCARD_TYPE from TBL_DTL where BILL_NO=#billNo# )