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

Get your favourite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved 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: 212 | Views in the last 30 days: 3
 
Related Articles
FORUM

Validating Canadian Postal Codes

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

FORUM

Canadian Postal Code validator

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

FORUM

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...

FORUM

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...

ARTICLE

The SQL Server Postal Service

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

Tags
t-sql    
 
Contribute

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
Editor, SQLServerCentral.com

Already a member? Jump in:

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