Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everybody
In a daily load I want to update records only in current month records and it should not update previous month records. Here we don't have any date column and we have only key column is there.
we can do update without date column also. But I need current month records only should be affected in load.
Please give me any ideas.
Regards,
Reddy
If you don't have date, how would you even know if a particular row is for this month or last month?
Agrred with Sunny.
Check these threads, may help you..
Incremental Load without Date field
Incremental Load without Updated Date and Time
Incremental load without date in Database
http://www.learnqlickview.com/a-qlikview-qvd-function-to-simplify-incremental-data-load/
I mean date column in the sense, I have like mm-yyyy column is there. Not like dd/mm/yyyy.
Oh okay, then you should be able to do something like this:
Step 1) Load the new data for just the current month using the date field you have.
Step 2) Load your complete data, but use a where not exist statement to remove all the ids which are present in your new incremental data. (so remove the last one month worth of ids)
Step 3) Concatenate the new incremental data (Table in Step 1) to your existing data (Table in Step 2)
Hi Sunny,
Thanks for your reply.
If you don't mind, can you give me outline code.
Regards,
Kumar
Try something like this:
NewData:
LOAD A,
B,
C,
Date,
ID as ID_Check
FROM Source
Where Num(Date) >= Num(MonthStart(Today()));
Data:
LOAD A,
B,
C,
Date,
ID
FROM someqvd.qvd (qvd)
Where not Exists(ID_Check, ID);
Concatenate(NewData)
LOAD A,
B,
C,
Date,
ID_Check as ID
Resident Data;
DROP Table NewData;