Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
johnso2080
Contributor
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

1 Solution

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


talk is cheap, supply exceeds demand

View solution in original post

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


talk is cheap, supply exceeds demand
IAMDV
Luminary Alumni
Luminary Alumni

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