stripout numeric data from the column value in oracle

I want stripout numeric data from the column value

ex :: Column name = abc
abc having the values like
INV242436,
APPY246578,
PO141423,
FSO897623,
APAC126756
I want like this..
INV,
APPY,
PO,
FSO,
APAC
PRAVEEN TAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pawan KumarDatabase ExpertCommented:
Please use like this ..

We have use like below

SELECT regexp_replace(abc,'\d','') abc from YourTableName

Sample Tested Code

SELECT * FROM
(
SELECT regexp_replace('INV242436','\d','') a from dual UNION ALL
SELECT regexp_replace('APPY246578','\d','') a from dual UNION ALL
SELECT regexp_replace('PO141423','\d','') a from dual UNION ALL
SELECT regexp_replace('FSO897623','\d','') a  from dual UNION ALL
SELECT regexp_replace('APAC126756','\d','') a from dual
)o

Open in new window


OUTPUT

 	A
1	INV
2	APPY
3	PO
4	FSO
5	APAC

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pawan KumarDatabase ExpertCommented:
Or below ones..

SELECT * FROM
(
SELECT regexp_replace('INV242436','[0-9]','') a from dual UNION ALL
SELECT regexp_replace('APPY246578','[0-9]','') a from dual UNION ALL
SELECT regexp_replace('PO141423','[0-9]','') a from dual UNION ALL
SELECT regexp_replace('FSO897623','[0-9]','') a  from dual UNION ALL
SELECT regexp_replace('APAC126756','[0-9]','') a from dual
)o

Open in new window


or
SELECT * FROM
(
SELECT regexp_replace('INV242436','[[:digit:]]','') a from dual UNION ALL
SELECT regexp_replace('APPY246578','[[:digit:]]','') a from dual UNION ALL
SELECT regexp_replace('PO141423','[[:digit:]]','') a from dual UNION ALL
SELECT regexp_replace('FSO897623','[[:digit:]]','') a  from dual UNION ALL
SELECT regexp_replace('APAC126756','[[:digit:]]','') a from dual
)o

Open in new window


Output

 	A
1	INV
2	APPY
3	PO
4	FSO
5	APAC

Open in new window

0
PRAVEEN TAuthor Commented:
thank you .. working fine
0
Pawan KumarDatabase ExpertCommented:
We can also use Translate function for this kind of requirement.

WITH CTE AS
(
	select 'INV242436' a from dual union all
	select 'APPY246578' from dual union all
	select 'PO141423' from dual union all
	select 'FSO897623' from dual union all
	select 'APAC126756' from dual
)
SELECT translate(a, 'a0123456789', 'a') a FROM CTE

Open in new window


OUTPUT

 	A
1	INV
2	APPY
3	PO
4	FSO
5	APAC

Open in new window

0
Pawan KumarDatabase ExpertCommented:
Welcome. Happy to help. :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.