2 Replies Latest reply: May 8, 2013 11:36 AM by Brett Nelson RSS

    Loading SQL Records to review oldest date recorded.

    Brett Nelson

      Everyone,

       

      Below is a script to load data which contains multiple records for each Plate Code, for example the plate may have been used last week and made 1000 items against a job number then again today for a different job for 500, i would like to select either via script or expression the must recent date that the plate was last used for review. below is script and example of basic table showing a plate used on two dates. (So i want to for review only use 06/05/2013?

       

      Thanks in advance. Brett

       

      qlikview 1.png

       

       

       

      ODBC

      CONNECT TO ****** (XUserId is JRTDMRZNFDbGXXZNJF, XPassword is FCPUDRZNFDbGXXZNMF);

      SQL SELECT ToolStatus,
          ToolStatusDesc
      FROM PUB."PV_ToolStatus";

      SQL SELECT
         completed,
          event,
          history,
          toolRunQty as JobRunQty,
          toolCode as PlateCode,
          toolType
        FROM PUB."PV_JobToolHistory";

      SQL SELECT DeliveryDue,
          LastMoveDate,
          OrderDate,
          RunTotal,
          ToolCode as PlateCode,
          ToolStatus
      FROM PUB."PV_Tools";

      // Loading Temp File
      TEMP:
      SQL SELECT completed
      FROM PUB."PV_JobToolHistory";
      DATA:
      LOAD (completed),
             
      Date(completed) as [Date Job Ran],
             
      Day(completed) as [Day Job Ran],
             
      Month(completed) as [Month Job Ran],
             
      Year(completed) as [Year Job Ran]

      Resident TEMP;
      Drop table TEMP;