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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Where Not Exists

Hi all,

Could some please explain what does the sentence "Where not Exists" Does when you are doing incremental loads?

1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

You probably knows the incremental load example in  Rob Wunderlich's cook book (if not: http://robwunderlich.com/downloads/ ), I am refererring to that file.

It also contains a lot of comments, so it's worth having a look at.

The approach uses

a) a Modification Date

b) a unique Key per row

the script finds the max modification date from the historical data in the qvd.

Then it starts building the data table with loading newer data from the data source.

It then concatenates the existing historical data from the qvd, but only if the unique Key not already exists

(this is the place with "where not exists"). Thus we can not only add data to the historical data, but also modify existing rows (because only the row with newer ModDate is kept, the historical data with same unique key will not be read).

Hope this helps,

Stefan

View solution in original post

2 Replies
swuehl
Champion III
Champion III

You probably knows the incremental load example in  Rob Wunderlich's cook book (if not: http://robwunderlich.com/downloads/ ), I am refererring to that file.

It also contains a lot of comments, so it's worth having a look at.

The approach uses

a) a Modification Date

b) a unique Key per row

the script finds the max modification date from the historical data in the qvd.

Then it starts building the data table with loading newer data from the data source.

It then concatenates the existing historical data from the qvd, but only if the unique Key not already exists

(this is the place with "where not exists"). Thus we can not only add data to the historical data, but also modify existing rows (because only the row with newer ModDate is kept, the historical data with same unique key will not be read).

Hope this helps,

Stefan

Not applicable
Author

Thanks a lot for your explaination, Its clear now!!