Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
I am doing the following in the script:
Temp:
LOAD
MaxString(SanityChecks_Execution_Date) as Max1
Resident SanityChecks
WHERE SanityChecks_LoadOrigin='GSB-Cubes';
LET vMax1=Peek('Max1',0,'Temp');
DROP TABLE Temp;
Temp1:
LOAD
Maxstring(SanityChecks_Time_Month) as Max1
Resident SanityChecks
WHERE (SanityChecks_LoadOrigin = 'GSB-Cubes' and SanityChecks_Execution_Date = $(vMax1));
LET vMax2=Peek('Max1',0,'Temp1');
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.
Jon
Jon
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
Jonathan
Jon
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
Jonathan
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 😉
Thanks!