Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mhmmd_srf
Creator II
Creator 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
swuehl
MVP
MVP

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
swuehl
MVP
MVP

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
Creator II
Creator II
Author

Thanks Stefan...thanks for clarifying...

Chanty4u
MVP
MVP

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