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: 
arusiva89
Contributor III
Contributor III

Qlik Default Join

I am joining two tables.Lets say for example(Table A, Table B)

Table A:

A,B

Table B:

A,C

The result from the above is not matching when I put outer join between these two

Table A:

A,B

outer join(Table A)

Table B:

A,C

 

Ideally both should be same right?

7 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It's quite possible you would get different results by joining in script vs leaving as two seperate tables.  In the case of there being duplicate values for A, you would generate additional values for C.  For example:

TableA:
A, B
A1, B1
A1, B2
A2, B3

TableB:
A, C
A1, 100
A2, 200

sum(C) = 300

outer Join(TableA) from TableB and the result would be:

TableA:
A, B, C
A1, B1, 100
A1, B2, 100
A2, B3, 200

sum(C) = 400

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

arusiva89
Contributor III
Contributor III
Author

Thanks for the clarification.How can I eliminate duplicate in that case?using not exists?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Leave them as separate tables if you don't want the duplication. 

arusiva89
Contributor III
Contributor III
Author

##- But I have to build one resident table using that join table
Please type your reply above this line -##
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

We are kind of going in circles here. Why do you need to have one table?

arusiva89
Contributor III
Contributor III
Author

I need to build a column using column from two tables..In my case,for ex -
if(B=1 &C=3,set flag)
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

In that case I would recommend using ApplyMap. See https://qlikviewcookbook.com/2020/03/creating-temporary-script-associations/

-Rob