Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I cant' solve this problem.
Actually the script works perfectly but I have to do 2 load resident tables
instead of one.
There are no error.
If some "," or ";" is missing it is a mistake of reduction script's line.
Rem --------------------------------------------------------------------------- ;
Rem CONCATENATE ;
Rem ------------------------------------------------------------------------- ;
MovimentiDrop:
LOAD
Article,Color,Quantity,'File1' as NameFile1;
SQL SELECT *
FROM BPINEG.DIHMVTFP
WHERE DEDATE>=$(vStartSql);
Concatenate (MovimentiDrop)
LOAD
Article,Color,Quantity,'File2' as NameFile2;
SQL SELECT *
FROM BPIFIC.BGLOBAL5
and WKDATA>$(vStartSql);
Noconcatenate
Rem --------------------------------------------------------------------------- ;
Rem READ & APPLY COST ;
Rem ------------------------------------------------------------------------- ;
FileCosti:
SQL SELECT *
FROM BPINEG.BIFORMFP
where FODATA>=$(vStartSql);
LEFT JOIN (MovimentiDrop)
LOAD
StartDate + IterNo() -1 AS DataCalcolata33,
((100-Eur_Additional)/100) as EurAdditional,
RESIDENT FileCosti
WHILE StartDate + IterNo() - 1 <=EndDate;
Rem --------------------------------------------------------------------------- ;
Rem PROBLEM ;
Rem ------------------------------------------------------------------------- ;
Movimenti:
load *,
(VekStd*EurAdditional) as VekAdditional
resident MovimentiDrop
where EXISTS(NomeFile1);
load *,
(VekStd*EurAdditional) as VekAdditional
resident MovimentiDrop
where EXISTS(NomeFile2);
Drop table MovimentiDrop;
Rem --------------------------------------------------------------------------- ;
Rem I would like (loading data 1 time) load both table
Rem IN THIS CASE THE SCRIPT LOAD ONLY ;
Rem THE FIRST TABLE (BPINEG.DIHMVTFP)
Rem ------------------------------------------------------------------------- ;
Load *,
(VekStd*EurAdditional) as VekAdditional
resident MovimentiDrop;
Many thanks
Claudio
Hi, Claudio,
you load in the first table the field NameFile1 and than you want to load resident the same table, where exists the fieldcontent from NameFile1 (or NomeFile1) - Where do you create the variable, what is NameFile1 (or NomeFile1) resp. NameFile2 (or NomeFile1)? In the expression Where exists you have to enter first the Field already in QlikView loaded, than the Field, which is in this Loadstatement! But, both fields are just loaded!
p.e.
Table1: load field,field2,...,'File 1' as NameFile1 From Table1;
Table2: load field,field3,...,FieldX as NameFile2 From Table2 Where exists(NameFile1,FieldX);
Hi Martina,
thank you for your answer, problably i'm not been very clear.
I have used NameFile1 and NameFile2 to use it during EXIST (RESIDENT LOAD)
but I don't need to import NameFile1 and NameFile2
I need to import all records and I would like to do this:
MovimentiDrop:
LOAD
Article,Color,Quantity;
SQL SELECT *
FROM BPINEG.DIHMVTFP
WHERE DEDATE>=$(vStartSql);
Concatenate (MovimentiDrop)
LOAD
Article,Color,Quantity;
SQL SELECT *
FROM BPIFIC.BGLOBAL5
and WKDATA>$(vStartSql);
...
....
...
After join left I woul like import all record loaded from DIHMVTFP & BGLOBAL5
Many Thanks