Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have 4 tables that are joined to the same variable (Medid) in each table. I do not want to input this data when I initially load it into the same table because they different file layouts. But I want to show a Table that has all the 'medid' appended together in one column. I'm used to Access and I could create a union query for this but I'm not able to figure this out. Thanks.
Hi, this is in the script, in eacmple to concatenate the "Medid" field of all tables it could be:
DataTable:
LOAD Medid;
SELECT Medid FROM Managed;
Concatenate (DataTable)
LOAD Medid;
SELECT Medid FROM Output;
Concatenate (DataTable)
LOAD Medid;
SELECT Medid FROM UTR;
Concatenate (DataTable)
LOAD Medid;
SELECT Medid FROM NEwEnrlee;
In example if each table has only one row whit the same Medid value, you wll end with a 4 rows table, all ofur with the same Medid value (if Medid values are differnt the values will be different.
Join is a different thing, if you change 'Concatenate' by 'Outer Join' it will try to merge data from all tables where has the same Medid value. In this case the previous example will end with a one row table.
Hi, check out for "Concatenate" it does the union of different tables: https://help.qlik.com/en-US/sense/February2022/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPref...
I get this in theory but I am not yet understanding the language of Qlik so that I can write this. I have an App called "CM" so I guess that is the file name. I have the following table names which each have a 'Medid' field that I want to join:
- Managed
- Optout
- UTR
- NewEnrlee
If someone could help translate the syntax it would be much appreciated!!
Hi, this is in the script, in eacmple to concatenate the "Medid" field of all tables it could be:
DataTable:
LOAD Medid;
SELECT Medid FROM Managed;
Concatenate (DataTable)
LOAD Medid;
SELECT Medid FROM Output;
Concatenate (DataTable)
LOAD Medid;
SELECT Medid FROM UTR;
Concatenate (DataTable)
LOAD Medid;
SELECT Medid FROM NEwEnrlee;
In example if each table has only one row whit the same Medid value, you wll end with a 4 rows table, all ofur with the same Medid value (if Medid values are differnt the values will be different.
Join is a different thing, if you change 'Concatenate' by 'Outer Join' it will try to merge data from all tables where has the same Medid value. In this case the previous example will end with a one row table.