Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> TO_NUMBER() question
Chaps,
I want to do something like:
SELECT text text_value,TO_NUMBER(text) number_value FROM my_table;
If my_table.text is numeric, there's no problem. However, if it's not numeric, I get an ORA-01722.
Basically, if the "text" field cannot be converted into a number, I want "number_value" to be set to null, or zero.
Any idea?
Cheers Received on Mon Sep 24 2001 - 09:54:10 CDT