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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Merging two same QVD's with set of same records

Hi,

I am trying to merge two same QVD's with set of same of records. After reloading that script, I am able to see double the records in that QVD. But in table box chart when pulling all columns, it is displaying only 10 records.

My doubt is when concatenate same QVD with set of same records, will double that record count in QVD.

17 Replies
Colin-Albert
Partner - Champion
Partner - Champion

I find it better to avoid joins in QlikView as far as possible. QlikView is not a database!

Qlik Design Blog : Don't join - use Applymap in... | Qlik Community

sunny_talwar

May be do this:

test_Temp:

load * from events.QVD

concatenate

load*from events.QVD

test:

NoConcatenate

LOAD DISTINCT *

Resident test_Temp;

store test into path\events.QVD

DROP Tables test, test_Temp;

or you can also use Where Exists with a unique identifier in both tables:

test:

load * from events.QVD

concatenate

load*from events.QVD

Where not Exists(ID); -> Assuming ID is a unique identifier

store test into path\events.QVD

aapurva09
Creator
Creator

Use DISTINCT keyword after you concatenate the QVDs. You can also join the QVDs depending on the situation.

PrashantSangle

Hi,

Try Not Exist() in where clause while Concatenating 2nd QVD in where clause.

It will help you to avoid duplicate records while loading.

Reards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Colin-Albert
Partner - Champion
Partner - Champion

test:

load * from events.QVD

concatenate

load * from events.QVD

You are loading the same data twice so you are duplicating every row.

Why are you concatenating the data from events.qvd to the data already loaded?

If you want the distinct data then add the distinct command to create a distinct table

test:

load DISTINCT * from events.QVD

Anonymous
Not applicable
Author

Thanks Sunny.

In second solution youhave mentioned where not exists(ID).

If we don't have any ID columns?

I have 10 key columns.

sunny_talwar

You can create a ID field by Concatenating all your 10 fields in that case:

test:

LOAD *,

        AutoNumber(Field1&'|'&Field2&'|'.....) as ID

from events.QVD

concatenate

load*from events.QVD

Where not Exists(ID, AutoNumber(Field1&'|'&Field2&'|'.....));

store test into path\events.QVD

Anonymous
Not applicable
Author

Thanks for ur wonderful help