Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
A newbie question :
My script :
QUALIFY *;
UNQUALIFY DateID, "KEY_*";
REF_LIEU:
LOAD KEY_ID_LIEU,
LEFT(Replace(VA_GEOLOC_LAT, ',' , '.'), 5)&',' &LEFT(Replace(VA_GEOLOC_LNG, ',' , '.'), 5) as CODE_URL
FROM
REF_LIEU.qvd
(qvd);
LET rowLieu = NoOfRows('REF_LIEU');
trace $(rowLieu);
for i=1 to $(rowLieu)
let codeUrl = FieldValue('REF_LIEU.CODE_URL',$(i));
let codeLieu = FieldValue('KEY_ID_LIEU',i);
let vUrl = 'http://www.myweather2.com/developer/forecast.ashx?uac=gqu-Qe4J9Q&output=xml&query=' & codeUrl;
trace $(vUrl);
forecast:
LOAD date,
temp_unit,
day_max_temp,
night_min_temp,
[night/weather_text],
[night/weather_code],
[night/wind/speed],
[night/wind/dir],
[night/wind/dir_degree],
[night/wind/wind_unit],
[day/weather_text],
[day/weather_code],
[day/wind/speed],
[day/wind/dir],
[day/wind/dir_degree],
[day/wind/wind_unit],
$(codeLieu) as KEY_ID_LIEU
FROM [$(vUrl)] (XmlSimple, Table is [weather/forecast]);
next
In the loop, multiple table are created ... I would like to concatenate informations in one table
Any help please
Thanks
Try this?
QUALIFY *;
UNQUALIFY DateID, "KEY_*";
REF_LIEU:
LOAD KEY_ID_LIEU,
LEFT(Replace(VA_GEOLOC_LAT, ',' , '.'), 5)&',' &LEFT(Replace(VA_GEOLOC_LNG, ',' , '.'), 5) as CODE_URL
FROM
REF_LIEU.qvd
(qvd);
for i=0 to NoOfRows('REF_LIEU')-1
let codeUrl = peek('REF_LIEU.CODE_URL',$(i),'REF_LIEU');
let codeLieu = peek('REF_LIEU.KEY_ID_LIEU',$(i),'REF_LIEU');
let vUrl = 'http://www.myweather2.com/developer/forecast.ashx?uac=gqu-Qe4J9Q&output=xml&query=' & codeUrl;
forecast:
LOAD date,
temp_unit,
day_max_temp,
night_min_temp,
[night/weather_text],
[night/weather_code],
[night/wind/speed],
[night/wind/dir],
[night/wind/dir_degree],
[night/wind/wind_unit],
[day/weather_text],
[day/weather_code],
[day/wind/speed],
[day/wind/dir],
[day/wind/dir_degree],
[day/wind/wind_unit],
'$(codeLieu)' as KEY_ID_LIEU
FROM [$(vUrl)] (XmlSimple, Table is [weather/forecast]);
next
Regards,
Kiran Rokkam.
sorry but it's not working ![]()
REF_LIEU << REF_LIEU 4 lignes récupérées
forecast << weather/forecast 2 lignes récupérées
forecast-1 << weather/forecast 2 lignes récupérées
forecast-2 << weather/forecast 2 lignes récupérées
forecast-3 << weather/forecast 2 lignes récupérées
(I'm using QlikView 11)
move "forecast:" before "for ..."
sorry it doesn't work too
"Unknown statement
forecast:
for i=0 to NoOfRows('REF_LIEU')-1
let codeUrl = peek('REF_LIEU.CODE_URL',4,'REF_LIEU')"
May be this will help you. Reload and check the log file.
If problem persists share the log file (can be generated with document properties->general->Generate log file).
Kiran Rokkam.
OK, i find why it's not working ...
Because I qualify the table REF_LIEU
thank you 🙂
try :
date as Date