2 Replies Latest reply: Jan 25, 2013 9:35 AM by Deepak Vadithala RSS

    Concatenate Tables

    Darren Johnson

      Hello!

       

      Could anyone tell my why this piece of script doesn't work? It's giving me the error message:

       

      Table not found

      STORE Web_MarketingItem INTO \\bhsrvqlikview\C$\ProgramData\QlikTech\Documents\WEBQVD\Web_MarketingItem.qvd

       

      The table Web_MarketingItem should be found? (Web_MarketingItem and MarketingItem contain the same fields)

       

       

      IF(NOT ISNULL(QvdCreateTime('\\bhsrvqlikview\C$\ProgramData\QlikTech\Documents\WEBQVD\Web_MarketingItem.qvd'))) THEN

       

          Web_MarketingItem:

          LOAD * FROM [\\bhsrvqlikview\C$\ProgramData\QlikTech\Documents\WEBQVD\Web_MarketingItem.qvd] (qvd);

          CONCATENATE

          LOAD *

          RESIDENT MarketingItem;

          STORE Web_MarketingItem INTO \\bhsrvqlikview\C$\ProgramData\QlikTech\Documents\WEBQVD\Web_MarketingItem.qvd;

         

      ELSE

       

          STORE MarketingItem INTO \\bhsrvqlikview\C$\ProgramData\QlikTech\Documents\WEBQVD\Web_MarketingItem.qvd;

         

      END IF

       

      Thanks!

       

      Darren

        • Re: Concatenate Tables
          Gysbert Wassenaar

          If you create the table MarketingItem first and then create another table with exactly the same fields without also specifying noconcatenate then the second table won't be created but the data will be concatenated in MarketingItem. This should then solve that problem:

           

          Web_MarketingItem:

              NOCONCATENATE LOAD * FROM [\\bhsrvqlikview\C$\ProgramData\QlikTech\Documents\WEBQVD\Web_MarketingItem.qvd] (qvd);

          • Re: Concatenate Tables
            Deepak Vadithala

            Hi Darren,

             

            I think QlikView is doing implicit Concatenation somewhere before the start of IF statment. I'm saying this without looking at the script because you're using

                LOAD *

                RESIDENT MarketingItem;

            If you are using Resident Load of MarketingItem, then you must be loading somewhere above your script. So I think you should add NoConcatenate to your script. To stop the automatic implicit concatenation. Something like this...

             

             

            IF(NOT ISNULL(QvdCreateTime('\\bhsrvqlikview\C$\ProgramData\QlikTech\Documents\WEBQVD\Web_MarketingItem.qvd'))) THEN

             

            NO CONCATENATE

                 Web_MarketingItem
            :

                LOAD * FROM [\\bhsrvqlikview\C$\ProgramData\QlikTech\Documents\WEBQVD\Web_MarketingItem.qvd] (qvd);


                 CONCATENATE


                LOAD *

                RESIDENT MarketingItem;

                STORE Web_MarketingItem INTO \\bhsrvqlikview\C$\ProgramData\QlikTech\Documents\WEBQVD\Web_MarketingItem.qvd;

               

            ELSE

             

                STORE MarketingItem INTO \\bhsrvqlikview\C$\ProgramData\QlikTech\Documents\WEBQVD\Web_MarketingItem.qvd;

               

            END IF

             

            I hope this helps!

             

            Cheers,

            DV

             

            www.QlikShare.com