Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
Please tell me how to make Key between 2 tables having data as::
Table A:
Header 1 | Header 2 | Header 3 |
---|---|---|
aa | 01 | 200 |
bb | 01 | 300 |
cc | 06 | 300 |
dd | 08 | 200 |
Table B:
Header 1 | Header 2 | Header 3 |
---|---|---|
aa | 06 | 800 |
bb, aa | 01 | 300 |
cc, dd | 02 | 700 |
dd | 08 | 900 |
I have to make Key between Table A and Table B with Header 1 column...Plz show me the right way to do that...
hi
TableA:
load
* from TableA;
TableB:
load
subfield(Header1,',') as key
Header2 ,
Header3
from TableB;
PFA sample application Hope this will definitely help you.
Vikas
Hi Rahul,
that depends on which record from table_B you want to get joined/ linked to which record in table_A.
Generally, you can split the strings (pieces of text) in that header_field by using either of the string functions
- LEFT()
- RIGHT
- SPLITFIELD() (might be best if you know that your separator is always a ',')
=> Load the result as a new field which has to have the same name as the field_to_link_to in the other table - QlikView automatically links fields that have the same name.
HTH
Best regards,
DataNibbler
Table1:
load [Header 1] as Key,[Header 2], [Header 3] from table1;
Table2:
load
subfield(Header,',') as Key,
[Header 2],[Header 3] from table 2;