Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

johnso2080
New Contributor

Concatenate Tables

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

Tags (2)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Concatenate Tables

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);


talk is cheap, supply exceeds demand
2 Replies
MVP & Luminary
MVP & Luminary

Re: Concatenate Tables

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);


talk is cheap, supply exceeds demand
Luminary
Luminary

Re: Concatenate Tables

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