Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have two tables
Table1:
Sitecode |
---|
3 |
4 |
Table2:
Sitecode | Value |
---|---|
3 | 15 |
3 | 10 |
4 | 20 |
4 | 30 |
My Desired Output:
load Table2 where sitecode is 3 and store it in april_3.qvd
load Table2 where sitecode is 4 and store it in april_4.qvd
Error i am getting:
in april_3.qvd i get datas where sitecode is 3
but in april_4.qvd i get both sitecode 3,4(here i need only sitecode 4)
my script is:
SheetName1:
LOAD
Sitecode
FROM [lib://data/test22.xlsx]
(ooxml, embedded labels, table is Sheet1);
for iSheet = 0 to NoOfRows('SheetName1') - 1
let vSheetName1 = peek('Sitecode',iSheet, 'SheetName1');
Final:
LOAD
Sitecode,
Name,
Value
FROM [lib://data/test.xlsx]
(ooxml, embedded labels, table is Sheet1) where Sitecode='$(vSheetName1)';
Store Final into [lib://data/april_$(vSheetName1).qvd] (qvd);
Next iSheet
drop table SheetName1;
Maybe this would help:
thanks Tomasz
Is there any other solutionns