Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

LEFT JOIN IN QLIKVIEW ?

Hi,

I am trying to join two tables in Qlikview but require all the data in Table 1 and only related data in Table 2.  Therefore in SQL this would require a straight forward left join however I can't seem to get this working in QV.

Qualify*;

UnQualify CUST_ID ;

DATA:

LOAD "CUST_ID",

     "123",

     "456" ,

SQL SELECT *

FROM "TABLE_1";

Qualify*;

UnQualify CUST_ID ;

LEFT JOIN (DATA)

SALES:

LOAD "CUST_ID",

     "ABC",

     "EFG",

SQL SELECT *

FROM "TABLE_2";

I require all the values in CUST_ID in TABLE 1 - e.g. in the application if I run a simple COUNT(CUST_ID) it should show the total number of values in TABLE1 for CUST_ID.  However unfortunately this is not happening!  Where am I going wrong?

14 Replies
Not applicable
Author

hello,

if i have more then 4 tables but i need to create "LEFT JOIN" all of 3 tables into 1 table then what should i use?

i want to create left join from Dish_Index table

kindly help

Not applicable
Author

plz help

Not applicable
Author

Hi,

Does this help:

Dish_Index:

LOAD

  FileName_ID,

  Field2,

  //add more fields

FROM  Dish_Index;

//Left Join - the field names in the two tables being joined must match

// Field1=Field1 (left join) for all tables joined with Dish_index

//first table: Dish_Index LEFT JOIN ON Dish_phrase

LEFT JOIN (Dish_Index)

LOAD

  FileName_ID,

  Field3,

//add more fields

FROM Dish_phrase;


//Second table: Dish_Index LEFT JOIN ON Dish_custom_topics

LEFT JOIN (Dish_Index)

LOAD

  FileName_ID,

  Field4,

//add more fields

FROM Dish_custom_topics;

Not applicable
Author

if you want  to join all table in one table i advise use concatenate instead of left join or right join because it will affect on your application performance,it  will slow in reloading time. also in addition left join or right join are used based on the requirement, but if you want to join table in one table only used concatenate.

Ibobob70
Contributor II
Contributor II

hi

I have the same problem but higher  number of records than my original table  :). and I do not count key-field.