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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Incrementalload

Hi can any body provide me executable incremental load for updation and deletion is there in Db

5 Replies
its_anandrjs
Champion III
Champion III

What do you mean by Executable incremental load script, you can find this script in the resource location also.

Not applicable
Author

I need simple script to understand functionality for updation and deletion is there.

Regards

Ricardo_Gerhard
Employee
Employee

If you want to reload only pre-defined values, try to use where condition in locad script.

Another option is use a column flag like "wasmodified" or "datamodified" to incremental load.

Ricardo Gerhard
OEM Solution Architect
LATAM
maxgro
MVP
MVP

copied from Qlikview online help

(search incremental load)

Case 4: Insert, Update and Delete

The most difficult case to handle is when records are actually deleted from the source database between script executions. The following conditions apply:

  • The data source can be any database. 
  • QlikView loads records inserted into the database or updated in the database after the last script execution. 
  • QlikView removes records deleted from the database after the last script execution. 
  • A field ModificationDate (or similar) is required for QlikView to recognize which records are new. 
  • A primary key field is required for QlikView to sort out updated records from the QVD file. 
  • This solution will force the reading of the QVD file to standard mode (rather than optimized), which is still considerably faster than loading the entire database.

Script Example:

Let ThisExecTime = Now( );

QV_Table:

SQL SELECT PrimaryKey, X, Y FROM DB_TABLE

WHERE ModificationTime >= #$(LastExecTime)#

AND ModificationTime < #$(ThisExecTime)#;

Concatenate LOAD PrimaryKey, X, Y FROM File.QVD

WHERE NOT EXISTS(PrimaryKey);

Inner Join SQL SELECT PrimaryKey FROM DB_TABLE;

If ScriptErrorCount = 0 then

STORE QV_Table INTO File.QVD;

Let LastExecTime = ThisExecTime;

End If

Not applicable
Author

your answer is good.i need code for that.

Regards