Posts: 132
Name: Will Anderson
Location: Terre Haute, IN
|
Frankly I would use two tables to store this anyway, to reduce the storage size.
Code:
id|state|city
1 |CO |Denver
4 |IL |Chicago
6 |IL |Springfield
7 |IL |Joliet
8 |CO |Arvada
9 |IN |Springfield
10|IN |Hamilton
11|DE |Denver
Code:
id|zip
1 |77201
1 |77202
1 |77203
4 |60505
4 |60504
6 |61202
7 |65243
8 |77302
9 |50309
10|50398
11|10348
Now not only is your query easier, but you don't store as much duplicate data.
Now to add a new zip code, just add the id and zip to the second table, rather than the id,state,city, and zip to the first table.
Last edited by anderswc; 01-20-2009 at 10:05 AM..
|