SQL Query sort by closest match
问题 We have a Locations search page that is giving us a challenge I've never run across before. In our database, we have a list of cities, states, etc. with the corresponding geocodes. All was working fun until now... We have two locations in a city named "Black River Falls, WI" and we've recently opened one in "River Falls, WI". So our table has records as follows: Location City State ------------------------------------- 1 Black River Falls WI 2 Black River Falls WI 3 River Falls WI Obviously