This topic is locked

querying based on calculated input data

3/10/2007 2:06:30 PM
ASPRunnerPro General questions
F
fireblade20772 author

I have two tables: A user table that has a zip code column and a zip code table with long and lat columns. I want to search in the user table and return a list of users whose zip codes are in some area around the zip code and distance I submit. The zip code table is used to retrieve the zip codes in the range.
How can I do it?

J
Jane 3/13/2007

Hi,
here is a sample query:

select UserTable.field1,

UserTable.field2,

...

UserTable.ZipCode

from UserTable, ZipCodeTable

where UserTable.ZipCode=ZipCodeTable.ZipCode and ZipCodeTable.ZipCode>90001 and ZipCodeTable.ZipCode>90025