Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Validating Canadian Postal Codes

By Ryan,

For fellow Canadians and neighbours to the south, you may find useful a function to validate the formatting of a Canadian postal code.  More than once I've had to work with web programmers on checking that a postal code meets the A1A1A1 style, so carry around a function that simply returns a true/false bit if a submitted varchar value does not meet our Canadian postal code standard.  I hope you find it useful!  Thanks to a colleague Patrick M. for quality checking this script.

Total article views: 222 | Views in the last 30 days: 2
Related Articles

Validating Canadian Postal Codes

Comments posted to this topic are about the item [B]Validating Canadian Postal Codes[/B]


Canadian Postal Code validator

Comments posted to this topic are about the item [B]Canadian Postal Code validator[/B]


Canadian Postal Code Format

Hello, all: I'm fairly new to T-SQL, so I'm sure there's a relatively simple way of doing this, b...


Canadian Postal Code and US Zip

I have an import process where we receive US Zip and Canadian Postal Codes in the same field. We use...


The SQL Server Postal Service

One way to understand Service Broker is to think of it as a postal service. New author Sachin Dedhia...


Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones