Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

incremental load

Hi All,

I am new to Qlikview and have a requirement like below.

Daily I am getting two excel files namely account_inserts and account_updates(these files will be override on daily basis with latest data) which don't have any time stamp columns and having only ID column. Finally I want to combine two files as single as account.QVD.

On daily it should append only current month data only not previous months records.

I know incremental load, but this is something different requirement as I am feeling

Please help me on this issue.

Regards,

Kumar

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Maybe (pseudo code)

//Load your updates

LOAD *

FROM [account_updates.xlsx](ooxml, embedded labels, table is Plan1);

If FileSize('yourqvd.qvd') > 0 then

//Load your records that are not updated

LOAD *

FROM [yourqvd](qvd)

WHERE NOT Exists(someKeyField);

endi;f

//Load your inserts

LOAD *

FROM [account_inserts .xlsx](ooxml, embedded labels, table is Plan1);

store table into [yourqvd](qvd);

View solution in original post

9 Replies
Clever_Anjos
Employee
Employee

Maybe (pseudo code)

//Load your updates

LOAD *

FROM [account_updates.xlsx](ooxml, embedded labels, table is Plan1);

If FileSize('yourqvd.qvd') > 0 then

//Load your records that are not updated

LOAD *

FROM [yourqvd](qvd)

WHERE NOT Exists(someKeyField);

endi;f

//Load your inserts

LOAD *

FROM [account_inserts .xlsx](ooxml, embedded labels, table is Plan1);

store table into [yourqvd](qvd);

Anonymous
Not applicable
Author

Hi,

Thanks for providing code.

In this code I have seen qvd file being included. When you do very first time we don't have this file? If I run this code it will throw error.

Regards,

Kumar

Anonymous
Not applicable
Author

You can use Binary load in this scenario else where

Open Qlikview > Edit Script> fetch both file into the edit script> name the tables .  concatenate both the tables. and Store it as a QVD . then use windows scheduler to automatically get a qvd for you.

if you want me to guide for window scheduler do let me know.

santhosh_k_n
Creator II
Creator II

Hi,

As mentioned, there is no time stamp/date field in the xls files ur receiving, i suggest to save the QVD with a time stamp say temp_23112015.qvd.

and you can manullay(or can define scripts to) deleate or copy the previous month QVDs into a another folder so that only current month QVD files get loaded.

Hope this is usefull

BR, SK

HirisH_V7
Master
Master

Hi,

You can use only  *.xlsx     As Filename. This will pick all the files which are in the folder .This Data will append automatically and get updated if the Header are same in all excels and You can use the where condition for month field.

It can be like this,

LOAD *

FROM

[\*.xls]

(biff, embedded labels, table is Sheet1$);

Hope this helps,

regards ,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
Anonymous
Not applicable
Author

Hi,

Can anyone provide me with example. I tried with excel files overriding and qvd also overriding.

Regards,

Kumar

Clever_Anjos
Employee
Employee

I´ve updated the code

Anonymous
Not applicable
Author

Thanks clever and it is working fine.

Clever_Anjos
Employee
Employee

Good to know