Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> TO_NUMBER() question

TO_NUMBER() question

From: _Andy_ <withheld_at_address.com>
Date: Mon, 24 Sep 2001 14:54:10 GMT
Message-ID: <3baf4885.341804939@news.colt.net>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US