Ask the Expert

Validating postal code spaces

I have a MySQL database with records that were imported previously for validation. I'd like to locate all Canadian postal codes without a space between the character sets and replace them with a space. For example, A1A2B2 would turn into A1A 2B2. Where can I learn how to do this?

Requires Free Membership to View

You would be better off removing spaces from the rows that do have spaces. The space is not part of the postal code and can be added later when needs be.

This was first published in August 2004

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: