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

Combining to QVD's on key columns

Hi all,

I want to combine two different QVD's based on some condition. that is dim_account1.account_key=dim_account2.account_key

but it is giving wrong results when compare to data base.

below is my logic in qlikview. If i Do inner join it gives me 0 records, because in both the tables there are almost 23 columns are common

Combine:

LOAD * From dim_account1.QVD(qvd);

Right Join(Combine)

LOAD * From dim_account2.QVD(qvd);

STORE Combine into path/dim_account.QVD(qvd);

DROP Table Combine;



Please help me on this issue

Regards,

Kumar

11 Replies
Chanty4u
MVP
MVP

Kushal_Chawda

try this

QUALIFY *;

UNQUALIFY account_key;

Combine:

LOAD * From dim_account1.QVD(qvd);


UNQUALIFY * ;


QUALIFY *;

UNQUALIFY account_key;

Join(Combine)

LOAD * From dim_account2.QVD(qvd);

UNQUALIFY *;

STORE Combine into path/dim_account.QVD(qvd);

DROP Table Combine;


Anonymous
Not applicable
Author

Here the date value is hard coded. But it should not be like that.

i want to do like below in QLIKview. Is possible to write

select  * from dim_account1 a1,dim_account2 a2

where a1.account_key=account_key

Anonymous
Not applicable
Author

Kush, I have to say Thanks first.

Still it is giving for all columns as combine.coulmn name is giving.

How to remove this combine table name. Can you help me

Kushal_Chawda

QUALIFY *;

UNQUALIFY account_key;


dim_account1:

LOAD * From dim_account1.QVD(qvd);


UNQUALIFY * ;


QUALIFY *;

UNQUALIFY account_key;


dim_account2:

noconcatenate

LOAD * From dim_account2.QVD(qvd);

UNQUALIFY *;

Combine:

noconcatenate

LOAD *

Resident dim_account1;

join(Combine)

LOAD *

Resident dim_account2;


DROP Tables dim_account1,dim_account2;

STORE Combine into path/dim_account.QVD(qvd);

DROP Table Combine;

Anonymous
Not applicable
Author

Now I am seeing like dim_account1.column , dim_account2.column name

Kushal_Chawda

Hi,

I have used Qualify statement to perform join on Accountkey. qualify statement appends the table name to the fields.

If you are getting the desired results after joining then i don't think that field name will be the issue

Anonymous
Not applicable
Author

You are rite. But is there any way to remove these table name.column name.

Kushal_Chawda

You can rename the field using RENAME key word after loading the QVD.

RENAME table.field to Field;

RENAME table.field2 to field2;