search between to field’s Low range & high range

O

Octet32

I need to create a query that can search between to field’s Low range & high
range and determine the correct zip Range for a store. Can anyone help me?

[Address table] [ZipRanges] [ZipRanges] [ZipRanges]
Zip code Low zip High zip
Store
77713 75000 768999999 2323
76900 777999999
1212

I need a IIf statement if possible. store1212 is what i need.
 
M

Marshall Barton

Octet32 said:
I need to create a query that can search between to field’s Low range & high
range and determine the correct zip Range for a store. Can anyone help me?

[Address table] [ZipRanges] [ZipRanges] [ZipRanges]
Zip code Low zip High zip
Store
77713 75000 768999999 2323
76900 777999999
1212

I need a IIf statement if possible. store1212 is what i need.


Maybe(??) you need to use a query with a non-equi join (must
be done using SQL)

SELECT A.Store, Z.ZipRanges
FROM [Address table] As A INNER JOIN [ZipRanges] As Z
ON A.[Zip code] >= Z.[Low zip]
AND A.[Zip code] <= Z.[High zip]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top