Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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
Use DISTINCT keyword after you concatenate the QVDs. You can also join the QVDs depending on the situation.
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
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
Thanks Sunny.
In second solution youhave mentioned where not exists(ID).
If we don't have any ID columns?
I have 10 key columns.
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
Thanks for ur wonderful help