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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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