Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Dmilesikhailov
Contributor
Contributor

Customer table most recent

How do I load the last few hundred rows from a QVD with over one million rows?


Customer:

Load *

;

SQL Select *

From tblCustomer

1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

Something like this pattern:

 

Let vRowsToLoad = 200;
Let vLimit = Alt(QvdNoOfRecords('SourceQVD.qvd'), 0);
Let vStart = vLimit - vRowsToLoad - 1;

Data:
LOAD *
FROM [SourceQVD.qvd] (qvd)
Where RowNo() >= $(vStart);

 

Although this will scan the entire file, it should be reasonably quick -- a million rows is not a particularly large QVD.

Edit - fixed missing closing parenthesis.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein