Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik Certification Exam Sale - 40% off. Register by June 30, 2020. GET DETAILS
Highlighted
Contributor II

Two Tables with Same Field Names

Hi Experts,

I have one doubt.  Lets Assume a scenario like I have 2 tables names Customer and Customer New. Both have same fields CustID and CustName.

If I use below script:

Customer:

LOAD [Cust ID],

     [Cust Name]

FROM

[Two Table with Same Field Names.xlsx]

(ooxml, embedded labels, table is Sheet1);

Customer_New:

LOAD [Cust ID] ,

     [Cust Name]

FROM

[Two Table with Same Field Names.xlsx]

(ooxml, embedded labels, table is Sheet2);

It is not producing 2 table in Qlik. Rather it is creating only one table called Customer. As per my knowledge it should create 2 tables with synthetic key. Please explain. So that I can understand Qlik better.

Thanks,

Sarif

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: Two Tables with Same Field Names

Qlik will auto-concatenate table with same number and name of fields.

To prevent Qlik from doing this, use NOCONCATENATE LOAD prefix:

Customer:

LOAD [Cust ID],

     [Cust Name]

FROM

[Two Table with Same Field Names.xlsx]

(ooxml, embedded labels, table is Sheet1);

Customer_New:

NOCONCATENATE

LOAD [Cust ID] ,

     [Cust Name]

FROM

[Two Table with Same Field Names.xlsx]

(ooxml, embedded labels, table is Sheet2);

View solution in original post

3 Replies
Highlighted
MVP
MVP

Re: Two Tables with Same Field Names

Qlik will auto-concatenate table with same number and name of fields.

To prevent Qlik from doing this, use NOCONCATENATE LOAD prefix:

Customer:

LOAD [Cust ID],

     [Cust Name]

FROM

[Two Table with Same Field Names.xlsx]

(ooxml, embedded labels, table is Sheet1);

Customer_New:

NOCONCATENATE

LOAD [Cust ID] ,

     [Cust Name]

FROM

[Two Table with Same Field Names.xlsx]

(ooxml, embedded labels, table is Sheet2);

View solution in original post

Contributor II

Re: Two Tables with Same Field Names

Thanks Stefan...thanks for clarifying...

Highlighted
Esteemed Contributor III

Re: Two Tables with Same Field Names

Hi

by default Qlik vil joins two tables into one if the filed names are same.if you dont want that jst rename the filed name

lik below

Customer:

LOAD [Cust ID],

     [Cust Name]  as CustomerName

FROM

[Two Table with Same Field Names.xlsx]

(ooxml, embedded labels, table is Sheet1);

Customer_New:

LOAD [Cust ID] ,

     [Cust Name]

FROM

[Two Table with Same Field Names.xlsx]

(ooxml, embedded labels, table is Sheet2);