Discussion Board for collaboration on QlikView Scripting.
I am doing the following in the script:
LOAD MaxString(SanityChecks_Execution_Date) as Max1
DROP TABLE Temp;
LOAD Maxstring(SanityChecks_Time_Month) as Max1
WHERE (SanityChecks_LoadOrigin = 'GSB-Cubes' and SanityChecks_Execution_Date = $(vMax1));
When I perform the first load, the query returns 1 line which is correct. But when I perform the second load, the query returns zero lines which is impossible.
It is quite strange because I use as variable a value that has been extracted from the same table where I am performing the second load.
I have tried with several different combinations but seems as if the where clause does not allow more than one field, or that it does not work as expected.
Does somebody have any idea?
Thanks in advance.
Go to Solution.
I assume that SanityChecks_Execution_Date and SanityChecks_Time_Month are strings because you are using MaxString()? If they are strings, then you need to put quotes around vMax1 in the where clause:
WHERE SanityChecks_LoadOrigin = 'GSB-Cubes' and SanityChecks_Execution_Date = '$(vMax1)';
Hope that helps
1) are you sure the variable is correctly populated?
2) the field SanityChecks_Execution_Date is a complete date (hh:mm:ss) and doesn'm match
3)transform the string in date again
jhope it helps
Thanks for your answers.
The problem was that the value stored was an integer, and i was treating it as a string.
Everyday issues with dates ;-)