Solved

Parse through a String Value to extract only numeric values

Posted on 2013-06-25
5
339 Views
Last Modified: 2013-06-25
I have a situation on where I am receiving information or data from a vendor or third party. The problem is that they have a front end free form field that is designated for a phone number. I need to be able to parse through this field of data and only extract numeric data. So for an example, if I am given a free form value of:

Example A:
1 (404) 653-9832

End Result to Extract:
14046539832

Is there an efficient way about going about this? I have no access or control on the vendors side to locking down the format on the front end. I am currently working on 11g Oracle database.

Thank You!
0
Comment
Question by:Seaghost
  • 3
  • 2
5 Comments
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 305 total points
ID: 39275266
Try this:
regexp_replace('1 (404) 653-9832','[^[:digit:]]')
0
 

Author Comment

by:Seaghost
ID: 39275322
Let me give it a try.
0
 

Author Comment

by:Seaghost
ID: 39275330
Yes, I think this can resolve my issue. Thank You So much slightwv.
0
 

Author Closing Comment

by:Seaghost
ID: 39275331
Wonderful service like always.
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39275336
Glad to help!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ORA-12560: TNS:protocol adapter error 8 126
Query Records that don't match 8 42
Query to identify changes between rows of two tables 8 46
Oracle DBLINKS From 11g to 8i 3 31
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now