Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Join 3 tables

Hi,

I have three tables each with a key field (CustomerID) but within those tables there are 2 other fields (Title, Status) that are the same but have different values.  How does one combine them so that I do not get the $Syn 1.  I need to combine them for reporting purposes but when i do that i have 3 key fields.  If I run a left join, then I am unable to view the distinctions between the fields. 

I believe there is a simple solution.

Any help is greatly appreciated.

Thank you,

Nicholas

Tags (1)
8 Replies
Not applicable

Re: Join 3 tables

there are many other fields in Your tables right?

or there are just CustomerID, Title and Status?

if not You can prepare new key CustomerID_Title_Status

er_mohit
Not applicable

Re: Join 3 tables

hiiii

see the attached file

Not applicable

Re: Join 3 tables

LOAD CustomerID,

     title,

     status

FROM

C:\Users\vishwaranjan\Desktop\tablejoin.xlsx

(ooxml, embedded labels, table is Sheet1);

noConcatenate

LOAD CustomerID,

     title,

     status

FROM

C:\Users\vishwaranjan\Desktop\tablejoin.xlsx

(ooxml, embedded labels, table is Sheet2);

noConcatenate

LOAD CustomerID,

     title,

     status

FROM

C:\Users\vishwaranjan\Desktop\tablejoin.xlsx

(ooxml, embedded labels, table is Sheet3);

Not applicable

Re: Join 3 tables

why don't You just create simple loop:

for each vSheet in 'Sheet1', 'Sheet2', 'Sheet3'

LOAD CustomerID,

     title,

     status

FROM

(ooxml, embedded labels, table is $(vSheet));

next vSheet;

Not applicable

Re: Join 3 tables

vishwaranjan

by the way...

concatenate work with resident table?

i've got an issue...

robo:

LOAD * INLINE [

    Dealer, KEY, Date, WholeSale, Retail

    D1, D101-01-2013, 01-01-2013, 50, 2

    D1, D103-01-2013, 03-01-2013, 10, 5

];

final:

NoConcatenate LOAD Dealer,

     KEY,

     Date,

     WholeSale,

     Retail

     resident robo;

all the fields are still keys and those two tables are linked togetherSmiley Sad

could You explain that?

er_mohit
Not applicable

Re: Join 3 tables

hiii

there an issue of concatenate.

in this there is all  fields are keys using no concatenation thet will be treated as differe..

but for either writing concatenate or not (automatic) it will concat data due to the same field name..and remove keys .....

Not applicable

Re: Join 3 tables

i see...

anybody else got complex explanation?

manideep78
Not applicable

Re: Join 3 tables

Hi,

Concatenation doesnot bother whether it is a resident load or data loaded from any other source. If there are matching columns in both tables then automatically both tables will concatenate. If we use noconcatenate then synthetic keys occur and thier number is based on the common fields in both tables.