
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Analog Union all in Qlikview
Hi guys,
I have query from SQL, where use UNION ALL command. If somebody knows analog Union all in Qlikview.
Thanks,
- Tags:
- new_to_qlikview


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know the concatenate ... try to see in help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CONCATENATE


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
In Qlikview, you can concatenate tables to achieve the same effect as Union. In fact, QV will automatically concatenates tables if they have the same fields. You can prevent the auto-concatenation using NoConcatenate
Concatenate(Table1)
LOAD *
From Table2;
You can also pass a UNION through to SQL (to be executed by your DBMS, such as SQL Server) using the SQL keyword.
HTH
Jonathan


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try Concatenate:
Concatenate
If two tables that are to be concatenated have different sets of Fields, Concatenation of two tables can still be forced with the Concatenate prefix. This statement forces concatenation with an existing named table or the latest previously created Logical Table. A concatenation is in principle the same as the SQL UNION statement, but with two differences: first that Concatenate prefix can be used no matter if the tables have identical field names or not; and secondly that no removal of identical records are made.
It's basically the same thing.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That SQL query with UNION ALL should also work in Qlikview..
If you try to implement a LOAD from non SQL source you can use CONCATENATE. But you have to consider that (instead of SQL UNION) the resulting table will have all fields from both source tables. So, it could be better to use a field list with same field names from both sources in the two loads and not to use LOAD * FROM..
- Ralf

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Union ALL:
LOAD Field1, Field2 from Table1
Concatenate(Table1)
LOAD Field1, Field2from Table2
Union:
LOAD DISTINCT Field1, Field2 from Table1
Concatenate(Table1)
LOAD DISTINCT Field1, Field2from Table2
Cheers,
DV

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
..btw. the DISTINCT in first LOAD of your Union example will have effect for the whole resulting table.
