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

UNION ALL in SELECT Statement


Hi all,

Please advise on UNION All in Select query,How to use:

Select

Details1 as Details,

a,

b,

c

From A

UNION ALL

Select

Details2 as Details,

a,

b,

c

From B;

Above statement is not working in load script.

I want to extract data with a select statement

for performance tuning.

Thanks for help

Nitha

33 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Ashfaq has correctly answered your post. Concatenate the correct Qlikview syntax for a union. Did you even try it?

If this is not correct, then you may need to ask the question in other words, with much more detail.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
rbecher
MVP
MVP

Can you post the full statement. I see empty lines in the post above but this shouldn't be a problem..

Astrato.io Head of R&D
Anonymous
Not applicable
Author

Yes i have used concatenate,but it doesn't solve issue,like i said performance tuning.

database has millions of rows and dashboard is very slow,so i am trying to extract multiple(10) tables

with same column names to qlikview.

so if i extract with single sql statement , it might reduce data.

Thanks

Nitha

rbecher
MVP
MVP

..but could be the cause.

Astrato.io Head of R&D
jagan
Luminary Alumni
Luminary Alumni

Hi,

What is the error you are getting?  If query runs in Oracle then it definitely run in Qlikview also.

Regards,

Jagan.

rbecher
MVP
MVP

No necessarily, it's ODBC or OLE DB inbetween...

Astrato.io Head of R&D
Not applicable
Author

Hi Nitha,

First check with single query whether the connection is working or not. Whenever you are using set operators both queries must have same number of columns and same data types.

regards,

Vijayreddy

ashfaq_haseeb
Champion III
Champion III

Hi,

Try by loading all tables in qvd and then later perform concatenate on qvd.

Or else you can use oracle specific query after you made connection to your database.

Regards

ASHFAQ

Anonymous
Not applicable
Author

Hi Ralf,

Below is sql statement i am using:

SELECT
  Details1 as Details,
  CONTROL_KEY ,
  PKEY,
  LKEY,
  '1’ as Identifier
  From RSID
UNION ALL
SELECT
  Details2 as Details,
  CONTROL_KEY ,
  PKEY,
  LKEY,
  '2' as Identifier 
FROM RSIF
UNION ALL
SELECT
  Details3 as Details,
  CONTROL_KEY ,
  PKEY,
  LKEY,,
  '3' as Identifier
FROM RSIG

Only first select is getting highlighted

Anonymous
Not applicable
Author

Its ODBC