Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Set Data Columns with VARCHAR2 Datatype to Null If the Data is Not Numeric

orchidApr 5 2011 — edited Apr 6 2011
Greetings All,

I need to set several columns with 'VARCHAR2' datatype of an existing table to NULL if the data is not numeric so that I can change the datatype of these columns to the NUMBER datatype afterward. Is there an easy way to accomplish, maybe by using the Oracle SUBSTR or REGEXP_SUBSTR functions which unfortunately I am not familiar with? If you find any online resources could be of help to me, please share it with me.

Thanks much in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 4 2011
Added on Apr 5 2011
9 comments
428 views