I consider myself to be a somewhat savvy user of the main internet search engines. However, I did not have any luck finding a nice compiled list of Texas counties and the respective cities that are in those counties. Well actually there are some sites that will give you the data that you need but it will be given to you in pieces. So instead of running 250+ queries for every county in Texas, by searching through several sites and piecing the information together I compiled a list of Texas counties and the cities within those Texas counties.
The list of Texas counties and the cities within the Texas counties is columnar. It consists of two columns, the Texas county as the first column and the city inside that county in the second column. In the first column, you will usually find multiple instances of the county name and a unique instance of the city name in the second column. This is because the relationship of a city to a county is Many To One. There are many cities in one county, usually anyway.
If you have a similar compilation for other states please share them. I’m sure some poor sap like myself has spent a good amount of time searching for this information, so any contributions the public can make for other states is greatly appreciated.
Also, in the event you need the data pivoted, to where you have a city in a county per column, I will be posting that soon. It is going to be part of my next post where I demonstrate the pivot and unpivot features of SQL Server. Also, I’ll discuss how it came about compiling the list.
Enjoy the list of Texas counties and the cities inside these counties.
Click Here (Google Docs) to get the list in excel 97-2003 format.
Revised version (includes Rockwall – thanks Sharron)