Can someone help me to understand what the following does in the script? After the last two steps it continues with 10 more steps but with diffrent QCode, The problem is that QV goes out of memory after 6 steps so in some way I have to rewright the script.
if(RadNr = 12 and MeritValue> 0, ID) as Behor_12
if(previous(ID) = ID, peek(RadNr)+1, 1) as RadNr
Order By ID, MeritValueDesc;
Drop Table Tmp_MV2;
DistinctID as ID_12
ID as ID_Behor,
MeritValue as MV_SV
where exists(ID_12, ID) and QCode= 'SV';
join Load ID as ID_Behor, MeritValue as MV_SVA Resident Tmp_MeritValue where exists(ID_12, ID) and QCode= 'SV2';
There is some script missing, the table Tmp_MeritValue loads from resident table Tmp_MV2. Which version are you running? In the script editor, when you Debug instead of normal reloading, what message does it show and where it does stop?
Tmp_MV2 are ok, it´s beeing droped right after the second step from above in the previous post.
I only get a "Out of virtual and/or logical memory allocating 2 MB" message. Runs qv 10.
The script continue as follow
joinLoad ID asID_Behor, MeritValue asMV_EN
whereexists(ID_12, ID) andQCode= 'EN';
ID asID_Behor, MeritValue asMV_MA
whereexists(ID_12, ID) andQCode= 'MA';
ID asID_Behor, MeritValue as MV_FY
whereexists(ID_12, ID) andQCode= 'FY';
Same as above but diffrent QCode....After the 6th it goes out of memory.
So, Can you help me understand what the
" where isNull(Behor_12)=0; " means/does in the above post?
and what whereexists(ID_12, ID) means/does? - I think this sorted out the fields where ID_12 are the same as ID and my guess is that there ID_Behor stacks up with several thousands per ID. Because if I only goes for say 3 join steps and then abort and click "show freqvens" in the ID_Behor field it already there have freqvens for each ID of app 6000.
In QlikView, any function that returns 0 equals to false, otherwise, it's true. The IsNull() value should return -1 (true) when the value is actually null, so "IsNull(Behor_12)=0" means when "Behor_12" has some data.
The LOAD DISTINCT does indeed need a lot of memory and CPU, and if the number of records is high, that could be the cause. The first test is comment part of the script and try reloading.
And yes, the Exists(Field2, Field1) is used to load those records where value in Field2 in the current table matches with any other value in Field1, previously loaded.