I have been using this sql statement for quite some time. Just noticed it only works on single words.
sql = "SELECT Count(*) as Totalab FROM tablename WHERE city = '" & Server.URLEncode(rs("city")) & "'"
For example:
For the city of Brampton this works fine and returns 32 (just example), because Brampton is 1 word. For the city of New York it returns 0 (where it should return 56, for example) because New York is 2 words.