3 Replies Latest reply: Apr 13, 2012 7:04 AM by Venkat R RSS

    Let command

      I have a qlikview script which has worked for years, but suddenly in the last two weeks it's stopped working. I have determined for some reason the script doesn't want to pick up the variable for the where field, and is coming back with "field not found". I am currently using Qlikview 10. Any idea's on how I can fix this.


      If I remove the where clause it works fine, but off course my report is broken then.







      MAX([_Stock Date]) as [LatestDate]

      RESIDENT Stock_Data2;

      LET vQVDHistoryDate = fieldValue('LatestDate',1)-1;

      // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      // Load all (historic) data prior to the above date from the QVD file.  This goes into the Stocks_and_Orders table...
      // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


      [Storage Location],
      [Material Number],
      [Stock Date],
      [Stock Level],
      [Order Date],
      [Order Quantity]

      FROM Traceability.qvd (qvd) WHERE [Stock Date]<=$(vQVDHistoryDate);