21.01.2013 Views

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Script Example:<br />

QV_Table:<br />

SQL SELECT PrimaryKey, X, Y FROM DB_TABLE<br />

WHERE ModificationTime >= #$(LastExecTime)#<br />

AND ModificationTime < #$(BeginningThisExecTime)#;<br />

Concatenate LOAD PrimaryKey, X, Y FROM File.QVD;<br />

STORE QV_Table INTO File.QVD;<br />

Case 3: Insert and Update (No Delete)<br />

The next case is applicable when data in previously loaded records may have changed between script<br />

executions. The following conditions apply:<br />

l The data source can be any database.<br />

l <strong>QlikView</strong> loads records inserted into the database or updated in the database after the last script execution<br />

l A field ModificationDate (or similar) is required for <strong>QlikView</strong> to recognize which records are new.<br />

l A primary key field is required for <strong>QlikView</strong> to sort out updated records from the QVD file.<br />

l This solution will force the reading of the QVD file to "standard mode" (rather than "super-fast mode"), which is still<br />

considerably faster than loading the entire database.<br />

397

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!