Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to qualify a table that is loaded in a loop for. The problem is that QlikView generates as many tables as the loops. How can I load the data always in the same table ?
Thanks in advance
Thierry
qualify *;
for i = 1 to 5;
BdCPlanInfo:
LOAD RefCCTP,
Désignation,
Qté
FROM
$(Chemin)BDC$(i)*. xls
(biff, embedded labels, header is 6 lines, table is Récapitulatif$, filters(
Remove(Col, Pos(Top, 3)),
Remove(Row, RowCnd(CellValue, 2, StrCnd(null)))
));
next
unqualify *;
Thanks guys for your help. Finally I solved my problem by using a temporary table in the loop, then by loading it in another table after the qualify order.
for i = 1 to 5;
TempBdCPlanInfo:
LOAD RefCCTP,
Désignation,
Qté
FROM
$(Chemin)BDC$(i)*. xls
(biff, embedded labels, header is 6 lines, table is Récapitulatif$, filters(
Remove(Col, Pos(Top, 3)),
Remove(Row, RowCnd(CellValue, 2, StrCnd(null)))
));
next
qualify *;
BdCPlanInfo:
LOAD RefCCTP,
Désignation,
Qté
RESIDENT TempBdCPlanInfo;
DROP TABLE TempBdCPlanInfo;
unqualify *;
your can try "add" or "concatenate"
Thierry
If CONCATENATE does not work for you here, then manually override the field names to keep them in one table, but not linked to fields in another table (I assume that is what you are trying to do).
Something like this:
for i = 1 to 5;
BdCPlanInfo:
LOAD RefCCTP AS $(Chemin)BDC.RefCCTP,
Désignation AS $(Chemin)BDC.Désignation,
Qté AS $(Chemin)BDC.Qté
FROM
$(Chemin)BDC$(i)*.xls
(biff, embedded labels, header is 6 lines, table is Récapitulatif$, filters(
Remove(Col, Pos(Top, 3)),
Remove(Row, RowCnd(CellValue, 2, StrCnd(null)))
));
next
You might prefer to say
<fieldname> AS BdCPlanInfo.<fieldname>
Note - dont forget to remove the qualify * and unqualify * statements!
Jonathan
Thanks guys for your help. Finally I solved my problem by using a temporary table in the loop, then by loading it in another table after the qualify order.
for i = 1 to 5;
TempBdCPlanInfo:
LOAD RefCCTP,
Désignation,
Qté
FROM
$(Chemin)BDC$(i)*. xls
(biff, embedded labels, header is 6 lines, table is Récapitulatif$, filters(
Remove(Col, Pos(Top, 3)),
Remove(Row, RowCnd(CellValue, 2, StrCnd(null)))
));
next
qualify *;
BdCPlanInfo:
LOAD RefCCTP,
Désignation,
Qté
RESIDENT TempBdCPlanInfo;
DROP TABLE TempBdCPlanInfo;
unqualify *;