Solved

Postcode range question

Posted on 2009-04-06
1
453 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now