Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, everybody.
I have a QV project with data import from EXCEL via script.
I use the load statement like this and it works fine:
LOAD ....., OBDOBIE, ....
FROM
[source file]
(ooxml, embedded labels)
where OBDOBIE > Date#('1.6.2014','DD.MM.YYYY');
I'd like to improve automation of this statement, because the value for condition > '1.6.2014' I can get from another statement in the same script, connected to a SQL database:
SQL SELECT UZAVRENEOBDOBI
FROM "rsv2_stav".dbo."qryUzavreteObdobie";
This statement works fine too.
I'd like to use the result of Max(UZAVRENEOBDOBI), which is '1.6.2014 0:00:00', for my load statement.
How can I do this ?
Thanx in advance.
Duski
where Obdobie >= Date#('$(vUzavreneObdobi)','DD.MM.YYYY');
This would return data for 1.6.2014 upwards.
But I need only data for 2.6.2014 upwards.
Duski
Ok.
You are reading the first table twice.
qryUzavreteObdobie:
SQL SELECT UZAVRENEOBDOBI
FROM "rsv2_stav".dbo."qryUzavreteObdobie";
tempMax:
Load max(UZAVRENEOBDOBI) as maxUzavreneObdobi
resident qryUzavreteObdobie;
let vUzavreneObdobi = peek('maxUzavreneObdobi',0,'tempMax');
drop table tempMax;
....
LOAD ...., Obdobie, ....
FROM
[\\hxdata\users\vavra\Hornex\Riadenie\Podpora IS_IT\Koncepcie\Data IS\QlikView\20140704_PP.xlsx]
(ooxml, embedded labels)
where Obdobie > Date#('$(vUzavreneObdobi)','DD.MM.YYYY');
Hi, Simen,
this worked
where Obdobie > Date($(vUzavreneObdobi),'DD.MM.YYYY')
Thank you very much.
Duski