Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Postcode range question

Posted on 2009-04-06
1
Medium Priority
?
468 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
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 …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

604 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