Remove numeric value from a string
skapexSep 29 2012 — edited Sep 29 2012Oracle 10g.
I want to remove number from beginning of a string
eg,
1ABCD-remove 1 from string and keep ABCD
2PQRS35-remove only 2 from string (ie at beginning of string) and keep PQRS35.
I tried below code but it doesnot work for 2nd example above
select (CASE WHEN instr(:a,regexp_replace(:a,'\D'))=1 THEN substr(:a,2)
ELSE :a
END) result
from dual
Any suggestion would be of great help!!