select to_number('3434,3333.000') from dual;
/
select 'abc' - 124 from dual;
/
select '01-JUN-01' - 'abc' from dual;
/
测试:config:
表一
create table mms_err(id number(6),
section varchar2(5)
);
/
insert into mms_err
values(1,1);
/
insert into mms_err
values(2,2);
/
insert into mms_err
values(3,'C');
/
insert into mms_err
values(4,'D');
/
insert into mms_err
values(5,'E');
/
insert into mms_err
values(6,'F');
/
test:
update mms_err
set id=1
where section=1
报错:ORA-01722: invalid number
表二
CREATE TABLE MMS_SECTION
(SEQNUM NUMBER(4)
)
/
INSERT INTO MMS_SECTION
values(1);
/
INSERT INTO MMS_SECTION
values(2);
/
INSERT INTO MMS_SECTION
values(3);
/
INSERT INTO MMS_SECTION
values(4);
test--------
UPDATE MMS_ERR
SET SECTION=NVL((
SELECT SEQNUM
FROM MMS_SECTION
WHERE SEQNUM=SECTION),0)
WHERE ID IN(1,2,6);
/
UPDATE MMS_ERR
SET SECTION=NVL((
SELECT SEQNUM
FROM MMS_SECTION
WHERE SECTION=SEQNUM),0)
WHERE ID IN(1,2,6);
均报错;
ORA-01722: invalid number
如果section中全部都存数字,那肯定是OK的;但是where 后面在对比的时候,是把section转换成number型的 再比较的 故而出错;
参考:
asktom:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:11504677087008
http://space.itpub.net/35489/viewspace-85148
实例:
http://www.cnblogs.com/raymond19840709/archive/2008/05/16/1200826.html
http://jerrygao.javaeye.com/blog/168349
-------------------------ora-01403-------------------------------------------
select into,select不到数据就会报错 其中一种可能而已。