Recently one of my co-workers put in a request for a project so she could pull cities for a state by a letter range in a report she uses. For example give me all cities in a California that start with between a and g. This was easy enough to do with a regular expression.
where city regexp '^[a-gA-G]'
Then she came back to me and said that there were too many s's in our report for California because of all the cities that start with san or santa. So she needs a way to further divide the cities up and wanted to know if it would be possible to filter cities where the city name falls between San Francisco and San Jose. I started working towards this and realized that it is a much more complicated issue. Is there a moderately easy way to handle this kind of lookup or will I need to look in to alternate filtering methods?