I recently did a TO_NUMBER(column_name) and it converted it to a number successfully. My question is in regards to the data type, it is data type NUMBER in Oracle, originally the column is a varchar. Is it possible to do a TO_NUMBER conversion that would result in a data type of NUMBER(19,0) rather than just a NUMBER data type?
Here is my statement:
select column1, cast(regexp_replace(column1, 'hi') as NUMBER(19,0)) TEST from table1
However when I try to create a view with this I get:
Error(s) parsing SQL: Unexpected token at 63 near ,0)) TEST from table1.
Unexpected token at 65 near )) TEST from table1.
Is cast not possible to create a view?. Thanks,