Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
HamJan
Contributor II
Contributor II

Exists load with two fields

Hi.

I am trying to load new rows to my month table, so that i only load those that have new timestamp and match fields 1 or 2. So my table looks like

Field1  | Field2  | Timestamp

 xxx       | yyyy      | 2023-01-01 21:00:00
 xxx       | -              | 2023-01-01 21:00:00

-             | yyyy       | 2023-01-01 21:00:00

...

and i want to load to my new updated month table only those that dont have combination of field1 and timestamp or field2 and timestamp or both fields 1 and 2 and timestamp from my previous version of same month table. I have been trying with.

Month table  load

field1,field2, timestamp

from source

Concatenate(Monthtable)
LOAD
*
from $(vStorefile) (qvd)
where (not Exists(Field1,Field1) or not Exists(Field2, Field2)) and
not Exists(Timestamp,Timestamp);

But this does not work. Any tips / Ideas.

Labels (1)
2 Replies
Anku
Creator
Creator

Hi @HamJan , 

Add new fields along with original ones like;

Field 1,

Field 1 as F1, 

Field 2,

Field 2 as F2, 

Timestamp, 

Timestamp as T1, 

 

Then use them within where not exist clause and drop them at the end. 

 

HamJan
Contributor II
Contributor II
Author

@Anku You mean like?
Concatenate(Monthtable)
LOAD
*,Field1 as f1,..
from $(vStorefile) (qvd)
where (not Exists(Field1,F1) or not Exists(Field2, F2)) and
not Exists(Timestamp,T1);