Advertisement

03.15.2008 at 04:12PM PDT, ID: 23244570
[x]
Attachment Details

Cleaning Up MySQL data

Asked by bluedog666 in MySQL

Tags: MySQL

I was wondering if this can be done directly in a MySQL database:

I have a column with canadian postal codes (alphanumeric values) and would want to strip all non alphanumeric characters (spaces, dashes, etc)

Basically, running this on all the fields:

ereg_replace("[^A-Za-z0-9]", "", $postalCode );

Excuse a newbie... Start Free Trial
[+][-]03.15.2008 at 08:28PM PDT, ID: 21135499

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MySQL
Tags: MySQL
Sign Up Now!
Solution Provided By: brycen
Participating Experts: 2
Solution Grade: B
 
 
[+][-]03.15.2008 at 08:37PM PDT, ID: 21135523

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.15.2008 at 08:40PM PDT, ID: 21135529

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628