what I am saying is
are you sure all the data you have is correct and there are no mixture of varchar and number?
Look
Code:create table x (a varchar2(4)) Table created. insert into x values(1); 1 row created. insert into x values(2); 1 row created. create table y (a number); Table created. insert into y values(1); 1 row created. insert into y values(2); 1 row created. commit; Commit complete. select * from x, y where x.a = y.a; A A ---- ---------- 1 1 2 2 insert into x values('a'); 1 row created. select * from x, y where x.a = y.a; where x.a = y.a * ERROR at line 3: ORA-01722: invalid number select sum(a) from x; select sum(a) from x * ERROR at line 1: ORA-01722: invalid number




Reply With Quote