?
Solved

Postcode range question

Posted on 2009-04-06
1
Medium Priority
?
463 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 2000 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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Progress
Suggested Courses

765 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