Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
];
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
Hi
If i want to use inner join in name, place, thing , what should be the script
should i store these into a key?
Hi Shivesh,
Your script is correct. No rows returned is the expected result.
Kind regards
Andrew
Or to have a different perspective:
What do you expect to see as result given your two input tables?
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
];
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?
got it thanks.