3 Replies Latest reply: Jun 19, 2014 1:52 PM by Jennie Elliott RSS

    Load last 90 days of data into QVD

    Jennie Elliott

      I want to only load the last 90 days of data into a QVD. The following is my script. How would I accomplish this without specifiying a date?

       

      LOAD DISTINCT
       
      VendorTransID as VND|TransID,
          
      VendorTransType as VND|TransType,
          
      Applymap('TransTypeMap',VendorTransType, Null()) as VND|TransTypeDesc,
         
      Date(DayStart(VendorInvDate), 'M/DD/YYYY') as VND|InvDate, //Entered Date

           VendorPONumber as VND|PONumber,

          
      VendorPaidFlag as VND|PaidFlag,

          
      VendorCheckNumber as VND|CheckNum,

          
      Applymap('UserIDMap',VendorEnteredBy, Null()) as VND|UserName,

          
      VendorInvNumber as VND|InvNumber,

          
      VendorLocation as KEY|StoreNumber,

          
      Date(DayStart(VendorEnteredDate), 'M/DD/YYYY') as VND|InvEntDate

      FROM

      [C:\QlikView\QlikView Production\QVDocuments\SourceDocuments\QVD\TS\VEND\VendorTrans.qvd]

      (
      qvd)

      WHERE(VendorInvDate >= '4/1/2014');



      LEFT JOIN (VendorInvoices)

      LOAD DISTINCT

       
      VendorTransID as VND|TransID,

          
      VendorID as VND|VendorID,

          
      VendorInvAmount as VND|InvAmount

      FROM

      [C:\QlikView\QlikView Production\QVDocuments\SourceDocuments\QVD\TS\VEND\VendorJournal.qvd]

      (
      qvd);



      LEFT JOIN (VendorInvoices)

      LOAD DISTINCT

       
      VendorID as VND|VendorID,

          
      VendorAcctNo as VND|VendorAcctNo,

          
      VendorName as VND|VendorName

      FROM

      [C:\QlikView\QlikView Production\QVDocuments\SourceDocuments\QVD\TS\VEND\Vendors.qvd]

      (
      qvd);