Filter numeric part from varchar / filter numbers in oracle
This is about a oracle syntax which shows how to filter numeric values from a datatable column which is having both varchar and int together.
Example below:-
input --> 123123 Hrs
Then
out out --> 123123
If this is you want below code is most suiablt for it in oracle.
SELECT TO_NUMBER(regexp_replace(ColumnNameHere, '[A-Za-z]'))) FROM TableNameHere
Example below:-
input --> 123123 Hrs
Then
out out --> 123123
If this is you want below code is most suiablt for it in oracle.
SELECT TO_NUMBER(regexp_replace(ColumnNameHere, '[A-Za-z]'))) FROM TableNameHere
Comments
Post a Comment