2 Replies Latest reply: May 9, 2014 6:29 AM by Alessandro Saccone RSS

    QVD Loading Question

    Richard Knott

      Hi There

       

      I'm quite new to Qlikview - wondering if someone could help with the following please:

       

      I'm looking to import 2 QVD files into a QVW; for the purpose of this question we'll call them:

       

      1.  Customers

      2.  Transactions

       

      Is it possible to exclude some of the records in the Transactions QVD based off data in the Customers QVD?  For example: exclude transactions where the customer is from France?

       

      Am I correct in loading the entirety of the QVD into the QVW, given that we may wish to use certain records (from France for instance) in other QVW tabs?

       

      Hope that makes sense, thanks in advance for any response!

        • Re: QVD Loading Question
          Gysbert Wassenaar

          It's possible to exclude records when loading the data. You could not load the French customers in the Customers table:

           

          Customers:

          Load * from Customers.qvd (qvd) where Country <> 'France';

           

          // load only the customers where CustomerID exists in the table Customers

          Transactions:

          Load * from Transactions.qvd(qvd) where exists(CustomerID);

           

          If you want to load all customers into the Customers table you could drop the Customers table after load the Transactions table and then create the Customers table anew by load all the data from the Customers qvd.

           

          If you need the French customers and their transactions data on other tabs then you need to load the complete qvd files.

          • Re: QVD Loading Question
            Alessandro Saccone

            It is possible to excluse customers, let's suppose that both qvd's have customer_id field so qvd are linked by this field.

             

            AllData:

            noconcatenate

            Load * from Customers.qvd;

             

            Left Join

             

            Load * from Transactions.qvd;


            MyData:

            noconcatenate

            Load * resident AllData where Customer_Country = 'France';

            Drop table AllData;


            Let me know ...