Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

amien
Valued Contributor

load table with only new data

i have a table loaded in qv that contains data from a csv file.

Now i want to load that same csv file again. Only the new records that are found should be added to the qv-table.

the ones not found should not be deleted.

i have other tables/sources in the same qv that needs a full refresh. So the above mentioned table has a different load methode compaired to the rest.

is this possible?

1 Solution

Accepted Solutions
Not applicable

load table with only new data

Hi Amien,

first of all are a date field or a flag field in your excel file which can be used to identify new records?

If YES do an initial load and save your table as a *.qvd file.

Find MaxDate as example and expand the load statement .....from ..... Where Date > $(MaxDate);

Now load your *.qvd file. QlikView concatenate the new records to the ones coming from your qvd.

Store the new *.qvd file. Get the new MaxDate and so on.

See also the attached application (comments are in german but i´m sure you will understand the logic).

Good luck!

Rainer

3 Replies
blaise
Contributor III

load table with only new data

If you have a distinct number/string (like an invoice no) in the csv file you can use the "where not exists()". This will only loads records not previously loaded.

First LOAD:

LOAD * from csv ...;

Second LOAD:

LOAD * from qvd ...;

concatenate LOAD * from csv ... where not exists(InvoiceNo);

Not applicable

load table with only new data

Hi Amien,

first of all are a date field or a flag field in your excel file which can be used to identify new records?

If YES do an initial load and save your table as a *.qvd file.

Find MaxDate as example and expand the load statement .....from ..... Where Date > $(MaxDate);

Now load your *.qvd file. QlikView concatenate the new records to the ones coming from your qvd.

Store the new *.qvd file. Get the new MaxDate and so on.

See also the attached application (comments are in german but i´m sure you will understand the logic).

Good luck!

Rainer

amien
Valued Contributor

load table with only new data

Thank you .. very clear!

Community Browser