Solved

Postcode range question

Posted on 2009-04-06
1
456 Views
Last Modified: 2012-05-06
We have Canada postcodes in our SQL Server database with start and end range like (for example):

A0A1A0-A8A3P7
B0A1A0-B9A3V6
C0A1A0-C1N6W2
E0A1A0-E9H2C8
G0A1A0-G0A4Z0
G0B1A0-G0E2J0
G0G1A0-G0H1T0
G0J1A0-G0L4K0

How can we detect our customer postcode within the range using sql query or asp functions - please?
0
Comment
Question by:tingleweb
1 Comment
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 24077382
You should be able to test using the <[=] and >[=] operators.  If you post some of your SQL I can give more
specific advice, but it comes down to...

WHERE @postcode >= @StartPostRange AND @postcode <= @EndPostRange
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question