0

Problem in getting weather forecast

Hy all,

I'm trying to get weather forecasts for some cities through SQL

I would expect the following YQL to work, but it gives to me a "City not found error"

SELECT * FROM weather.forecast WHERE location IN (SELECT woeid FROM geo.places WHERE text="san francisco, ca")

It seems to me that the location filed of the weather.forecast requires some other location ID and not the woeid.
I tried to get the weather information calling the forecastrss wirh the woeid of San Francisco (http://xml.weather.yahoo.com/forecastrss?w=2487956&u=c) and I found in it a different ID fro San Francisco (USCA0987)

Then I tried to use YQL again with that ID and I finally got the forecasts for San Francisco
(SELECT * FROM weather.forecast WHERE location = 'USCA0987')

Is there a way to do that with just one YQL call?

Tnx in advance

Regards

Edoardo

0 Replies

Recent Posts

in YQL