Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
nvrphanikumar
Creator
Creator

Join Issue

Hi,

Fairly new to Qlik,trying to figure out whats wrong with this LEFT Join.

I should have seen 8 rows from Table A but instead get a result with number of rows that exist in Table B(80K rows).

  Table_A:

  REPORT_DT,

JOB_OPENING_ID

FROM [lib://QVDs/Table_A.qvd](qvd)

WHERE JOB_OPENING_ID = '201864';

Left join (Table_A)

FROM [lib://QVDs/Table_b.qvd](qvd);

Also,

I would like Both Table_A and Table_B to join based on Report_dt and JOb_Opening_id ;

Will it automatically join based on common columns or should I create a concatenated key ?

11 Replies
nvrphanikumar
Creator
Creator
Author

Sunny,

Finally figured out what the issue is.

During Join, I assumed that if I include all columns from all tables then data will get inserted as multiple columns. So I chose only the columns I needed in the output.

Table_A:

LOAD REPORT_DT,

    JOB_OPENING_ID

FROM [lib://QVDs/Table_A.qvd](qvd)

WHERE JOB_OPENING_ID = '201864';

Left join (Table_A)

LOAD

TARGETS

FROM [lib://QVDs/Table_b.qvd](qvd);

Which means I didn't include Join Condition columns in the statement.

After I changed the Query to below,I get correct results.

Table_A:

LOAD REPORT_DT,

    JOB_OPENING_ID

FROM [lib://QVDs/Table_A.qvd](qvd)

WHERE JOB_OPENING_ID = '201864';

Left join (Table_A)

LOAD

REPORT_DT,

    JOB_OPENING_ID,

TARGETS

FROM [lib://QVDs/Table_b.qvd](qvd);

sunny_talwar

Have you checked in your data model that it is now only storing 8 rows? I am surprised it made a difference. I mean a DISTINCT left join would have been explainable, but this is somewhat confusing. Is it a bug? I am not sure...