Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

JOINS

Hi Everyone

When and where which join is used.

I know the type of joins but not able to make the difference between them.

e.g

when i am using left join and using outer join between two table , getting the same result

please help me

thanks

8 Replies
alexandros17
Partner - Champion III
Partner - Champion III

tab 1

fld, val1

A, 10

B, 20

Tab 2

fld, val 2

A, 12

A, 13

C, 14

Join is done on fields with the same name

Tab 1 join Tab 2 (Join is the same for outer join) I have all the possibilities :

fld, val1, val2

A,  10,   12

A,  10,   13

B, 20, --

C,   ---, 14

Tab A left Join Tab B keeps all values for fls in Tab 1 and Add values for Tab 2

A,  10,   12

A,  10,   13

B,   20, ---

Hope it helps

abhaysingh
Specialist II
Specialist II
Author

i am clear with the logics but when i am developing the application and joining the tables according to need which join to be used not able to understand.

like

i am giving one of the example

i joined two table , i have done left join accordingly the o/p is there

but same two table i replaced left join with outer join and getting the same result why? there should be any difference between the output

sundarakumar
Specialist II
Specialist II

If you are gettin same result in left and outer join then it means that table 2 is subset of table one..

Left join will result in all the fields in table 1 and only machin field in table 2,

whereas outer jouin will result in all the fiels in both the tabls,

and inner will eresult in fiels that are common in both...

May be  u r having same set of fields in both th tables if you are getting same result for outer and inner join..

-Sundar

ToniKautto
Employee
Employee

I would suggest reading Understanding Join, Keep and Concatenate to get a feeling for which join, keep or concatenate you want to use in your given modelling scenario.

There is also an additional reading on Joins and Lookups that might be of interest if you want to get deeper insight in how to utilize QlikView better during data modelling.

alexandros17
Partner - Champion III
Partner - Champion III

It depends obviously by data contained in tables, if all data in first table is referenced by the second table, left or outer join return the same value.

Think in this way:

I need all combinations from the two tables or I need values from the first table completed with values of the second table where first table data exist? According to your answer choose outer or left

Hope it helps

hic
Former Employee
Former Employee

Are you sure you should join at all? Usually you don't need to - and shouldn't either. See http://community.qlik.com/blogs/qlikviewdesignblog/2012/09/12/to-join-or-not-to-join

HIC

sundarakumar
Specialist II
Specialist II

table1:

1

2

3

4

left join

table 2

1

2

3

the above scenario will result in same result as outer join.

maxgro
MVP
MVP