Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 

 

 

Oracle Regular Expressions for date address and telephone number formats

Oracle Database Tips by Donald Burleson

Oracle Data Unification

See also: Oracle Regular expressions indexes as a tuning tool

In a nutshell, data unification is the process of standardizing internal data formats, changing the values to a standard format "mask":

phone_number                  char(14)    (999) 999-9999
social_Security_Number        char(11)     999-99-9999

More complex unification involved standardizing formats of more complex columns like full_name and street_address.  These have lots of "rules", such as the standard way to reference a P.O. Box, standard abbreviations for streets, avenues and boulevards, and so on.  This type of internal data unification is the perfect application for regular expressions:

  • Date Format - A valid date might have a regular expression pattern that looks like this:

              (19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])

  • P.O. Box Format - Here is another example of using Oracle regular expression syntax to match a P/O. Box:
     
REGEXP_SUBSTR(street_address
   ,'BOX[([:space:]?\.?,?)]*+[[:digit:]]+' -- pattern
   , 1 -- position
   , 1 -- occurrence
   , 'i' ) -- modifier
 
  • Credit card Format - Here is a validation for a credit card number:
     
REGEXP_SUBSTR(credit_card_nbr
   , '(([[:digit:]]{4})
       ([[:space:]]|[[:punct:]]|)*){4}' ) acceptable

Now, let's look at the real challenge, multi-column data cleansing.  This is where you have the challenge of replicating the decision processes of a human, namely the data quality professional who is changed with identifying and repairing incorrect data.  As we will learn, this is an iterative process, and we start with small, modest successes and move-on to complex decision-logic after we have built the foundation.  Remember "We eat the Elephant one bite at a time".


For expert Oracle data cleansing support and data scrubbing consulting, use an expert from BC.  We understand the powerful Oracle data unification tools, and we can aid in improving the data quality of any Oracle database, large or small.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.