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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

[ask] how to join two different tables of qvds into one qvd ?

hello..

i'm still new in qlikview and need some support

i've made a few of qvds

and i want to join two qvds into 1 qvds

in database statement (example, sql server), i'll easily use :

select a.*, b.*

from tes1 a, tes2 b

where a.field1=b.field2

but how i can do that in edit script of qlikview?

is there any example of file?

i really need helps here..

many many thx...

7 Replies
Not applicable
Author

Hi Robert,

The solution is something like this:


FinalTable:
LOAD Field_1 as CommonField,
Value
FROM file_1.qvd
(qvd);
INNER JOIN
LOAD Field_2 as CommonField,
Value2
FROM file_2.qvd
(qvd);
store FinalTable into Final.qvd;


I hope it helps you.

Regards.

Not applicable
Author

Hi,

You can use it like

LOAD *;

SQL

select a.*, b.*

from tes1 a, tes2 b

where a.field1=b.field2;

This will give you the desired result as it was working in SQL database.

Regards,

Raj Kishor

Not applicable
Author

thx miquel it work

but when i try it from 1 table, it doesn't work

i did this :

join_table:

LOAD MST_SAHAM_CODE as kode_saham,

date(TRANS_SAHAM_DATE) as date_saham,

if(isnull(TRANS_SAHAM_VOLUME),0,TRANS_SAHAM_VOLUME) as volume

FROM

(qvd);

left join

LOAD MST_SAHAM_CODE as kode_saham_yest,

date(TRANS_SAHAM_DATE+1) as date_saham,

if(isnull(TRANS_SAHAM_VOLUME),0,TRANS_SAHAM_VOLUME) as volume_yest

FROM

(qvd);

but it got freeze

and an error pop up

why does it happen?

thx..

Not applicable
Author

Hi Robert,

I understand you are trying to join your qvds using date_saham field, and that's correct, It should work, could you attach the error message what you get?

Regards.

Not applicable
Author

HI Robert,

Just try to change

date(TRANS_SAHAM_DATE+1) as date_saham,

this to new one

date(TRANS_SAHAM_DATE) + 1 as date_saham,

and check.

Hope it should work or attach the error message.

Regards,

Raj Kishor

beristardj
Creator
Creator

Probably the common field in both tables for the nomenclature is a date, they tend to be of real continuous data, whether in whole or chains become probably summarizes the data.

I hope you work ...

magavi_framsteg
Partner - Creator III
Partner - Creator III

Hi Robert.

It "could" be that your date fields also have timestamps in them.

So try this (to join only the date part):

date(floor(TRANS_SAHAM_DATE)) as date_shaham

Kind regards

Magnus Åvitsland

BI Consultant

Framsteg Business Intelligence Corp.