I am retrieving data from external qvd file, then creating some new field (based on data from same qvd) and joining to the first table - Table1.
Since the fields I am adding will dynamically change, I woul like to do it (the join) with a loop.
The issue is that doing the left join once as in the commented script below takes about 2 seconds, while doing the same with the for next loop takes several minutes...). Everything is the same, except the loop.
Is there any good advice to work it around?
Thanks in advance,
FROM $(vTableDir)$(vTable).qvd (qvd);
//Loop over each currency and create currency translated coulumn
FOR EACH vCurr IN $(vCurrToRatesCross)
LET vCurrCode =Null();
Upper(CODE) AS CODE
FROM $(vAssociated)CURRENCIES.qvd (qvd)
WHERE CURRENCY =$(vCurr);
LET vCurrCode =Peek('CODE',-1,'CurrCode');
LET vField =Null();
////// It takes too much time... WHY ?? In the meanwhile, use as following: