Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
schumi1980
Contributor III
Contributor III

Load tables with exact similar structure, avoid double entries

Hi All

I want to load two tables into Qlikview with the exact same structure.

However, one table contains data for accounts from Jan 2015 till December 2017. The other table contains data from December 2017 till July 2018. It is not clear whether the first table and the same table contain both all the data from December 2017.

Hence, I would like to load all data from the second table that do not have the same account key/account reference like any account in the first table.

I wanted to use Where not Exists(Key). However, that created the problem that if an account has several rows in the second table, only one row would be loaded.

How can I avoid that the data from December 2017 is loaded twice, but all the data in the second table is loaded?

Many thanks.

Best regards,

Jan

1 Solution

Accepted Solutions
marcus_sommer

I think you just need to make your key unique maybe by adding the date and/or something like a OrderId to your account-id.

- Marcus

View solution in original post

4 Replies
YoussefBelloum
Champion
Champion

Hi,

using where not exist(field) will load no rows if the condition is met even if there is several rows in the same table..

schumi1980
Contributor III
Contributor III
Author

Yes, but the same happens for accounts in the second table that are not in the first table. I just get one row. I would like to avoid that.

marcus_sommer

I think you just need to make your key unique maybe by adding the date and/or something like a OrderId to your account-id.

- Marcus

schumi1980
Contributor III
Contributor III
Author

I was afraid of that. As there was no other solution I did that.