2 Replies Latest reply: Apr 6, 2017 4:54 PM by Muñoz Héctor RSS

    How to move one qvd data into a master qvd file

    Prashant k

      In qlikview ..i have two qvd files "increment.qvd" and "master.qvd" .

      Both the qvd files use the same script . I have to run the increment.qvd with new data every month and push the data in master.qvd .

      Both has same table structure .So that master.qvd is my master database . How can i do this .

        • Re: How to move one qvd data into a master qvd file
          Vladimir Komarov

          Do you need just add "Incremental" records to the "Master" table? If so, just do Concatenate Load:

           

          Master:

          load

          *

          from ...\Master.qvd (qvd);

           

           

          Concatenate (Master)

          load

          *

          from ...\Increment.qvd (qvd);

           

          If any update/delete of previous records is required, just use an appropriate JOIN load.

           

          Regards,

          Vlad

          • Re: How to move one qvd data into a master qvd file
            Muñoz Héctor

            Hi,

             

            // First, load the incremental QVD file

            MASTER:

            LOAD key as key_aux, // calculated field for avoiding duplicates by key when loading historical data

                   *

            FROM increment.qvd (qvd);

             

            // Second,, load the historical data. Use below WHERE clause if you donot want duplicate records by key

            CONCATENATE (MASTER)

            LOAD *

            FROM master.qvd (qvd)

            WHERE Not(Exists(key_aux, key));

             

            // Store all the fields except the calculated kay_aux

            STORE * // all the fields except key_aux

            FROM MASTER

            INTO master.qvd;

             

            DROP TABLE MASTER;

             

            Hoper it serves!

             

            Regards,

            H