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

Updating row data in table.

Halo Qlik Community

I want to make automatic update script, which runs every night. My system keeps data only from last 31 days, so it is rolling 31 days of data.

Example:

I have archive table TA with ID column (values: 1-1000) from 1-1-2017

and i have update table TU with ID column (values: 10-1009) from 2-1-2017

What I need is data range 1-1009 and more every night.

I'm quite new in Qlik sense, I heard something about left join or where not exist, but I'm not sure how to use it in that case.

Greetings.

3 Replies
arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Przemyslaw,

May be it help you:

Data:

Load

..

..

Datefield-today() as [Date Diff]

From

<path>

Noconcatenate

FinalData:

Load * resident Data where [Date Diff] <= 31;

Drop Table Data;

Thanks,

Arvind Patil

przemyslaw_r
Contributor II
Contributor II
Author

Hi

Thank you for reply!

31 rolling days in data base is the reason why I have to build archive data. So this expression is not necessary.

I would like to add every night data from previous day to archive table.

The idea is to append data from update to archive without same row data:Capture.PNG

Greetings

Przemyslaw Rybacki

przemyslaw_r
Contributor II
Contributor II
Author

So I think I have it.

TA:

LOAD

     ID,

     UNITS

FROM....;

Concatenate

TD:

     ID,

     UNITS

FROM....;

WHERE NOT EXISTS (ID)

;


Is it so simple? Results looks fine... Any remarks???