Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
shiveshsingh
Master
Master

Inner Join

i want to join below two tables through inner join.

Please suggest

test:LOAD * INLINE [

    name, place, thing, animal

    a, p, k, f

    b, q, l, g

    c, r, m, h

    d, s, n, i

    e, t, o, j

];

Inner Join(test)

car:LOAD * INLINE [

    name, place, thing, zoo

    b, p, k, sdfsd

    c, q, l, dfsd

    as, df, d, ddfvc

    zx, r, safd, cvde

    cv, vcv, vdsgf, htt

];

7 Replies
effinty2112
Master
Master

Hi Shivesh,

Your script is correct and correctly returns zero rows. An inner join will only return records that share values in the common fields. There is no row in the the second table that has values in the fields name, place and thing that match any row in the table test.

Regards

Andrew

shiveshsingh
Master
Master
Author

Hi

If i want to use inner join in name, place, thing , what should be the script


should i store these into a key?

effinty2112
Master
Master

Hi Shivesh,

Your script is correct. No rows returned is the expected result.

Kind regards

Andrew

swuehl
MVP
MVP

Or to have a different perspective:

What do you expect to see as result given your two input tables?

shiveshsingh
Master
Master
Author

as second table has 4 columns but i want to inner join it with three matching columns only i.e. name, place, thing


should i try it with

Inner Join(test)

car:LOAD * INLINE [

    (name, place, thing) as K, zoo

    b, p, k, sdfsd

    c, q, l, dfsd

    as, df, d, ddfvc

    zx, r, safd, cvde

    cv, vcv, vdsgf, htt

];

swuehl
MVP
MVP

No, Qlik will use the fields that appear in both tables, name, place, thing as key fields for the join.

You don't need to do anything special if you want to use these three fields.

As Andrew already said, your sample tables will produce an empty resulting table when joined, but that's due to the field values, i.e. the key values don't match.

I am unsure what your issue is.  Do you have a different expectation for the result?

shiveshsingh
Master
Master
Author

got it thanks.