Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limiting the number of rows

Hi,

I've a qvw file which has to be used as an input to anothe qlikview application.I want to restrict the number of rows fetched from this qvw file.

How can I do that?

7 Replies
Miguel_Angel_Baeyens

Hi,

The Binary load loads all data from the source document. You can either limitate the number of rows by creating a new source QVW with less rows, or store the tables in the source QVW into QVD files, then load a given number of rows from those QVD files in your report.

Hope that helps.

Miguel

Not applicable
Author

Hi,

for your purpose you can use the "first" prefix to a load or select statement.

Example to load the first 100 rows from abc.csv file:

ABC:

First 100 Load

     *

From abc.csv;

Bye.

Marco.

Not applicable
Author

1.you can load previously created qvw file in your existing file by using binary load.

2.you can limit your rows by applying condition:

load * resident tablename where (condition);

hope this will help you.

Not applicable
Author

Binary "c:\documents and settings\my documents\entire query.qvw";

load * resident tablename where (condition);

What will be the tablename and condition for this?

Not applicable
Author

tablename: from which you want to fetch data

condition: depends according to which you want to restrict the rows.

Not applicable
Author

The following gives errors:

ABC :

Binary "c:\documents and settings\my documents\entire query.qvw";

load * resident ABC;

I don't know which other tablename can be used as the resident table?

Also I want to fetch 10 rows . But where(rownum<=10) also gives errors.

Miguel_Angel_Baeyens

Hi,

As I mention above, Binary can only done once and in the first line of the script. You cannot do a load from a binary source as you do with an excel file, resident table or inline table.

But once you have done the binary, you can do as follows:

Binary ;

ReducedTable:

FIRST 10 LOAD *

RESIDENT Customers;

DROP TABLE Customers;

RENAME TABLE ReducedTable TO Customers;

Binary loads ALL data from SourceFile.qvw, meaning all tables and fields. But since you only want 10 lines from the table Customers, that exists in the SourceFile.qvw and now is in your data model, you can load the first 10 records into a new table named ReducedTable, then drop the original big Customer table, and finally rename your reduced table to Customers, to keep the names coming from the SourceFile.qvw.

Hope that helps.

Miguel