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!

substring to convert from varchar2 to number

LudockOct 30 2009 — edited Nov 1 2009
Hello all,

I have a little question..

columnA
'123 d'
'98-f'
'34.4'

How is it possible to get only the fist number characters of the column?

select substr(columnA,1,instr(columnA, non number char ) from dual ..

Anyone can help me ?

tnx Ludo
This post has been answered by Frank Kulash on Oct 30 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 29 2009
Added on Oct 30 2009
8 comments
1,469 views