• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ZipCode validation based on locale

New Here ,
Feb 05, 2008 Feb 05, 2008

Copy link to clipboard

Copied

Hello All.

I'm currently developing an application and i kind of ran into some problems that i'm trying to find a possible solution. This app will be used for many users spread out into Europe, Asia and Americas and one requirement is to validate a given zipcode based on the user's locale.

I've been trying to find examples on any possible web search engine that you could possible think of and no results so far.

Please, if any examples/questions fell free to write me or reply to this topic, your help is greatly appreciated.

Thanks

Alvaro Costa
Software Engineer
acosta@jaggedpeak.com
TOPICS
Advanced techniques

Views

277

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 05, 2008 Feb 05, 2008

Copy link to clipboard

Copied

LATEST
Here is a macro (sql function) we use for Canadian Postal Codes. Bear in mind that the data we receive does not have the normal space between the 3rd and 4th characters. The percentage sign represents the argument.

returns Y or N to indicate whether postal code is valid CASE WHEN
SUBSTR(%1,1,1)IN('A','B','C','E','G','H','J','K','L','M','N','P','R','S','T','V','X','Y')AND SUBSTR(%1,2,1)IN('0','1','2','3','4','5','6','7','
8','9')AND SUBSTR(%1,3,1)IN('A','B','C','E','G','H','J','K','L','M','N','P','R','S','T','V','W','X','Y','Z')AND SUBSTR(%1,4,1)IN('0','1','2','3
','4','5','6','7','8','9')AND SUBSTR(%1,5,1)IN('A','B','C','E','G','H','J','K','L','M','N','P','R','S','T','V','W','X','Y','Z')AND SUBSTR(%1,6,
1)IN('0','1','2','3','4','5','6','7','8','9')THEN 'Y' ELSE 'N' END

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation