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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
karan_kn
Creator II
Creator II

Incremental data load for dynamic month

Please help me to do incremental data load for dynamic month and store qvd

//Script

DB_Temp:

LOAD *,

Sales_Date,

Cust_ID,

CustName

From DBo....Sql Server

NoConcatenate

CurMnth:

LOAD Distinct

Sales_Date,

Cust_ID,

CustName

Resident DB_Temp;

Where Sales_Date>=MonthStart(Today()) and Sales_Date<=MonthEnd(Today());

Store CurMnth into Sales.qvd(qvd);

7 Replies
Anil_Babu_Samineni

Are you facing any error while reload()??

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
karan_kn
Creator II
Creator II
Author

nope, it will replace with current month while storing,

Example :

- Dec 2017 stored in QVD

- after refresh it replace with Jan 2018 instead of keeping Dec and Jan data

Anil_Babu_Samineni

I believe, This will Overload automatically. But, It keeps Dec month as well. Can you create dummy data for help.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
karan_kn
Creator II
Creator II
Author

Attached for your reference. Please consider inline text as from DB.

Anil_Babu_Samineni

I think, You need to load using Concatenate Like

Sales:

LOAD CustID,

     Sales_Date

FROM

[TSales.qvd]

(qvd) Where Sales_Date>=MonthStart(Today()) and Sales_Date<=MonthEnd(Today());

Concatenate

LOAD CustID,

     Sales_Date

FROM

[TSales.qvd]

(qvd) Where Sales_Date>=AddMonths(MonthStart(Today()),-1) and Sales_Date<=AddMonths(MonthEnd(Today()),-1);

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
karan_kn
Creator II
Creator II
Author

Thanks, would you please let me know remaining month also to concatenate like this Mar 2018.....?

Anil_Babu_Samineni

I believe, This is stupid way where my reply. Can you look this Do..loop ‒ QlikView

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful