Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use union all select query in qlikview

Hi,

I need to create a qlikview report. There is a MySQL query, the logic of the query should be used and the qlikview report should be generated. MySQL source query contains two select queries with an Union all between them. How do i do an union all in our qlikview. Its bit urgent. Can anyone guide me with clear picture so that i can make use of it.

Thanks,

Sase

7 Replies
tresesco
MVP
MVP

Use concatenate like:

Table1: Load * From <source1>;

Concatenate            // this would not be required if all the fields from two tables are common

Load * From <souerce2>;

ashfaq_haseeb
Champion III
Champion III

Hi,

True as said by tresesco you can try with concatenate.

Concatenate in Qlik is equivalent to Union All in SQL

Regards

ASHFAQ

Not applicable
Author

tresesco's is right. But why do you want to do a union in Qlikview here? Your example can have the UNION ALL in your select itself.

amit_saini
Master III
Master III

Kumar,

Follow this link:

Re: How can we do union in qlikview.

Thanks,
AS

jagan
Luminary Alumni
Luminary Alumni

Hi Kumar,

You can use your UNION ALL query directly in the dashboard and there is no need of splitting, suppose if you want to do it in Qlikview then use Concatenate() like below

Data:

SELECT

*

FROM Table1;

Concatenate(Data)

SELECT

*

FROM Table2;

'

'

'

'

Concatenate(Data)

SELECT

*

FROM Tablen;

Hope this helps you.

Regards,

Jagan.

forte
Partner - Creator
Partner - Creator

Hi Kumar ,

It should be not best option, but you can ever use original Query in order to obtain a fast result.

MyReportTable :

SQL SELECT field1, field2 .. from table1

union all

select field 3, field4 ... from table2;

You just obtain same result as query cursor. You can use any query accepted by your driver connector (join, union and even call stored procedures).

Regards

Not applicable
Author

Hi,

Thanks a lot for everyone, i am trying all the possible approaches given and will let u know whether i am getting what i need,,

Thanks