Oracle Database and Oracle Applications
Search This Blog
Sunday, May 3, 2015
Replace Alphabets in the String in Oracle SQL
to_number(REGEXP_REPLACE(REGEXP_REPLACE(
p_string
,
'[[:alpha:]]'
),
'[.]'
))
select to_number(REGEXP_REPLACE(REGEXP_REPLACE('AA.09A','[[:alpha:]]'),'[.]')) from dual
Output:
---------------------------
9
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)