Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
julioarriaga
Creator II
Creator II

My script is only loading the first table from two qvds

Hello everyone, thanks in advance for your help,

I think I'm misunderstanding something about how the syntax in QlikView works. I would like to know why the 2nd qvd 'CosttoServe_Sales' is loaded into the first QlikView table 'CosttoServe_TMA' when I'm indicating that it should be saved as 'CosttoServe_Fact'.

Thank you and regards.

(Image 1 - Code in which I want to create two separte tables from the qvds but both qvds are saved to the first table [I know the fields are called the same, I'm not interested for now in concating])

Capture1.PNG

(Image 2 - Script that exemplifies what is happening)

Capture2.PNG

(Image 3 - Only the CosttoServe_TMA table is created in QV)

Capture3.PNG

1 Solution

Accepted Solutions
sunny_talwar

Since the fieldnames within the two tables are exactly the same, they are getting auto-concatenated.... to check, you can look at the table viewer and you will find that the number of rows in your single table will be the sum of rows from both the table. I wonder why would you not want to concatenate because not concatenating them will create synthetic keys.... but in case you want to use these tables for further manipulation and want to keep them separate, you can use NoConcatenate keyword

CosttoServe_TMA:

LOAD [Date Key],

    [Customer ID],

    [Product ID],

    Item,

    Value

FROM CosttoServe_TMA.qvd (qvd);

CosttoServe_Fact:

NoConcatenate

LOAD [Date Key],

    [Customer ID],

    [Product ID],

    Item,

    Value

FROM CosttoServe_Sales.qvd (qvd);

View solution in original post

2 Replies
sunny_talwar

Since the fieldnames within the two tables are exactly the same, they are getting auto-concatenated.... to check, you can look at the table viewer and you will find that the number of rows in your single table will be the sum of rows from both the table. I wonder why would you not want to concatenate because not concatenating them will create synthetic keys.... but in case you want to use these tables for further manipulation and want to keep them separate, you can use NoConcatenate keyword

CosttoServe_TMA:

LOAD [Date Key],

    [Customer ID],

    [Product ID],

    Item,

    Value

FROM CosttoServe_TMA.qvd (qvd);

CosttoServe_Fact:

NoConcatenate

LOAD [Date Key],

    [Customer ID],

    [Product ID],

    Item,

    Value

FROM CosttoServe_Sales.qvd (qvd);

sasiparupudi1
Master III
Master III

Since you are loading the identical Column names from your second qvd, by default, qlikview  concatenates the second table to the first table.

You could prevent this by using the keyword NoConcatenate before the second load statement.

Hth

Sasi