Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Update/ Overwrite Resident QVD load logic

Hi All,

I have an issue where I need to update a table by evaluating the update date against the last updated date (SC_LastDate).

I will need to add a new record and remove the old record if the update has occured within the same month as the initial timestamp (SC_LastDate). If the update has occured in a different month, then append a new record to the table and maintain the old record.

The table in question is below:

error loading image

For example, SC_CompanyCode 151 may be updated on the 03/05/2010 and hence a new record requires to be appended to the table. If that record was then updated on the 05/05/2010, I would need to overwrite the existing record (03/05/2010) with the new record (05/05/2010).

i.e. IF monthname(updatedate) <> monthname(SC_LastDate) THEN append new record

ELSE IF monthname(updatedate) = monthname(SC_LastDate) THEN overwrite existing record

What is an easy, simplified way to do this ?

Thanks!

1 Reply
disqr_rm
Valued Contributor III

Update/ Overwrite Resident QVD load logic

It seems you could utilize "Patial Load" functionality. Check help on ADD and REPLACE keywords, and use them with your LOAD statements. Or did I misunderstood your question?

Community Browser