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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How can we get only numeric value from a column of Varchar2 type

840912May 22 2012 — edited May 23 2012
I have a table, there is a column in a table, the data type of this column is varchar2 but i want only numeric values from the column


SQL> Create table t1 ( col1 varchar2(10)) ;

Table created.

SQL> insert into t1 values('ZAHIR') ;

1 row created.

SQL> insert into t1 values('08831') ;

1 row created.

SQL> insert into t1 values('07066') ;

1 row created.

SQL> insert into t1 values('48331') ;

1 row created.

SQL> insert into t1 values('DEEN') ;

1 row created.

SQL>
SQL> commit;

Commit complete.


I want the output

08831
07066
48331

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 20 2012
Added on May 22 2012
13 comments
33,798 views