Solved

Postcode range question

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
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…

760 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

19 Experts available now in Live!

Get 1:1 Help Now