Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to write below union query in load script. But it is throwing error. Can you pls let me know what causing this issue?
LOAD Id,
a,
b;
SQL SELECT Id,
a,
b
FROM "TableA"
Union all
SQL SELECT id,
a,
b
FROM "TableB";
In qllik sense or qlik view if two table have the same structure. It automatically concatenated(Union All) into one table.
Qlik Sense script doesn't know a UNION operator. You can use CONCATENATE instead:
MyUnionTable:
SQL SELECT Id,
a,
b
FROM "TableA"
CONCATENATE (MyUnionTable)
SQL SELECT id,
a,
b
FROM "TableB";
Hi Manoj,
Union All is an old method in Qlik scripting so you can use CONCATENATE keyword instead of that.
SQL unions require that the same fields, with the same data types exist in each SELECT in the same order.
QV concatenates do not require any of these, but 'missing' fields will get null values.
Regards,
Quddus Mohiuddin
Hi Gysbert,
But SQL query with union works in Qlikview. It takes it as entire query. So this doesn't work only in Qliksense?
Every platform will have independent functionality, A concatenation is in principle the same as the SQL UNION statement.
Refer this: