Zip Code to City/State and vice-versa in a database?

Posted by Simucal on Stack Overflow See other posts from Stack Overflow or by Simucal
Published on 2009-02-05T21:28:17Z Indexed on 2010/06/05 21:32 UTC
Read the original article Hit count: 242

Filed under:
|
|

I'm new to SQL and relational databases and I have what I would imagine is a common problem.

I'm making a website and when each user submits a post they have to provide a location in either a zip code or a City/State.

What is the best practice for handling this? Do I simply create a Zip Code and City and State table and query against them or are there ready made solutions for handling this?

I'm using SQL Server 2005 if it makes a difference.

I need to be able to retrieve a zip code given a city/state or I need to be able to spit out the city state given a zip code.

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server