dear psaik,
I think to_number('a') will always raise an exception b'cos 'a' can not be converted into a number.
If you wish to use it in a query like:
select to_number(col) from ....
where col can contain invalid data then you can write a function and handle the exception inside the function and then return say null for rows with invalid data.
Regards,
Avinash
Main Topics
Browse All Topics





by: vemulPosted on 2002-11-27 at 08:21:57ID: 7504295
select SIGN(to_number(aChar)) from dual
will return 1 if aChar is positive
0 if aChar is 0
-1 if aChar is negative
and nothing if aChar cannot be converted to integer
u can use this and do what u need..
hth
vemul