Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Delete current month records in incremental load

Hi,

I am doing incremental load and I want to delete current month data in that load. I have to do it where clause, but how to include that condition where clause before doing STORE command. Please give me suggestions.

Regards,

Kumar

8 Replies
avinashelite

you need to update the condition in the main table you cannot have a where clause in the store statement

Try like this :

Incrimental_table:

LOAD *

where month<>currentmonth;

SQL

incrimental statements ;

or

create a resident table with table with the where clause and use the same in the store statement

Anonymous
Not applicable
Author

can we do sth like:

load

Date,

Restofdata

from YourTable where num(month(Date))<>(Not Equal to)num(Month(Today()))

Anonymous
Not applicable
Author

Thanks for your reply. Here date is coming from column DW_load_date. So CAn you tellme how do i include this month here.

Regards,

Kumar

Anonymous
Not applicable
Author

replace Date with DW_load_date

Anonymous
Not applicable
Author

just editing it:

use this:

load

date(Date,'DD/MMM/YYYY') as Date,

Restofdata

from YourTable where num(month(Date))<>(Not Equal to)num(Month(date(Today(),'DD/MMM/YYYY')))

Anonymous
Not applicable
Author

If my data is not today, then it will give me wrong results?

Anonymous
Not applicable
Author

Today only or not have for full today month??

if today only, no worry.

But if you are not having data of November, you would not be able to check whether its working or not

pljsoftware
Creator III
Creator III

Hi Kumar,

if would you like to make easy your job you can use the library RobWunderlich/Qlikview-Components · GitHub that contains all you need to do better incremental load.

I you want to delete record from a table you have to use inner join with a temp table where exists some fields with value that you that to mantain.

Best Regards

Luca Jonathan Panetta