Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
esuper21
Contributor III
Contributor III

QVD Concatenate New Records Only

I am trying to concatenate new records into my existing qvd file based on one field. I need today's record added in when new records are added as well. 

So far, I can add new records, but it adds ALL new records - only need where it doesnt exist in the original file

Script now: y =yesterday // x = today

Stat:
LOAD
*
FROM 'lib://AT Prod Folder/ITAMOR24_$(y).qvd'(qvd);

Concatenate

LOAD
SerialNumber,
"Date Added"
Resident ATOR24
where not exists(SerialNumber, "SerialNumber");

store Stat into 'lib://AT Prod Folder/ITAMOR24_'$(x).qvd(qvd);

Results:

I need the new highlighted record with 3/17 date and only that one for 3/17. The rest already had existing records so I don't want to add again.

concatenateqvd.PNG

2 Replies
martinpohl
Partner - Master
Partner - Master

because of your

not exists (SerialNumber)

you won't load datas from your database that are in the qvd.

So change the reload order.

First database, all new and changed datas and then the old datas.

Regards

esuper21
Contributor III
Contributor III
Author

I am *trying* to exclude records from the database that already in the qvd file. But it is adding everything still day-to-day