3 Replies Latest reply: Mar 19, 2013 11:46 AM by Alessandro Saccone RSS

    Where Clause Unexpected Result

      Hello everybody,


      I am doing the following in the script:



      MaxString(SanityChecks_Execution_Date) as Max1

      Resident SanityChecks

      WHERE SanityChecks_LoadOrigin='GSB-Cubes';

      LET vMax1=Peek('Max1',0,'Temp');

      DROP TABLE Temp;


      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.