MichaelHuber
Programmer
One of my VARCHAR2 fields contains numerics as well as alphanumerics. I'd like to use TO_NUMBER or a similar function against this field, and treat the alphanums as 0.
When I call TO_NUMBER('123'), of course it returns 123.
When I call TO_NUMBER('A123'), I get "ORA-01722: invalid number" ...but I'd like it to treat this as the number 0.
Any suggestions?
Thanks,
Michael
When I call TO_NUMBER('123'), of course it returns 123.
When I call TO_NUMBER('A123'), I get "ORA-01722: invalid number" ...but I'd like it to treat this as the number 0.
Any suggestions?
Thanks,
Michael