Search code examples
sqlyqlyahoo-api

Search Yahoo API geo.places with like operator


I want to use the Yahoo API with the geo.places table. It really works great with single queries, but I want to list all city names which names BEGIN with the query text.

This is my query URL right now:

http://query.yahooapis.com/v1/public/yql?q=select * from geo.places where text = 'dallas'

And this is what I want:

http://query.yahooapis.com/v1/public/yql?q=select * from geo.places where text LIKE 'dallas%'

Is it possible? If yes, how exactly?

I can't find any useful information in the docs about this type of query regarding the geo.places table :(

Thank you very much!


Solution

  • I was able to perform a request that seems to fit what you are looking for:

    http://query.yahooapis.com/v1/public/yql?q=select * from geo.places where text ='dallas*'