Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to create join among 4 qvd?

I am trying to achieve  this

//sql

select

table_1.a,

table_2.b,

table_3.c,

table_4.e

from table_1, table_2, table_3,  table_4

where

table_1.p = table_2.p and

table _2.q = table _3.q  and

table _3.r = table _1.r and

table_4.s = table_2.s

I know a way to achieve this qlikview using tables but I want to achieve this using qvds as the data is huge.

11 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

OK, that's a little different to what you asked in the original post. If you have a working SQL query, then do the join in SQL. That's usually the fastest because you only need to transfer the result to QV.

Otherwise, use the script that I posted earlier.

By default an unqualified QV join (no left/right/inner) is a full outer join, so you will want to specify "inner join" to be equivalent to the SQL example. You cannot achieve the join in QV without loading the join keys - how could QV perform the join without them? You can always drop them when the joins are done like I suggested.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

HI John,

thank you for your answer. I have one more problem so in the join I am trying to calculate a column based on fields from two tables like this

sql select

p.a as "some field",

(p.b * q.c) as calculation

from table_1 p,

table_2 q

where

p.t = q.r

so now in load statement (below) how do we put this join ?

DATA:

load

a,

b from

qvd_1

inner join(DATA)

load

(b * c) as calculation

from qvd_2

like this?? and one more question Can we store a sql select join query (like above i wrote) in a qvd??

I tried this but I could not get