Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
mhmmd_srf
Not applicable

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
swuehl
Not applicable

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

3 Replies
swuehl
Not applicable

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

mhmmd_srf
Not applicable

Re: Two Tables with Same Field Names

Thanks Stefan...thanks for clarifying...

Chanty4u
Not applicable

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