Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

qualify and loop for

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 *;

1 Solution

Accepted Solutions
Not applicable
Author

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 *;

View solution in original post

3 Replies
Not applicable
Author

your can try "add" or "concatenate"

jonathandienst
Partner - Champion III
Partner - Champion III

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

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 *;