Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to limit sql load to 1000 rows, that will really help me test, the SQL database is very large.
The code below is pulling all the data from sql, how can I limit this before a Qlikview preceding load?
Load *;
First (100) SQL SELECT DISTINCT * FROM xyz;
Thanks
Neil
You can debug and limit the load on 100 rows.
May be this:
SQL SELECT DISTCINT *
FROM xyz
WHERE ROWNUM <= 1000;
Other options can be found here: SQL SELECT TOP, LIMIT, ROWNUM
Similar to what Sunny T said, try:
LOAD *;
SQL SELECT DISTINCT TOP 1000 *
FROM xyz;
Or you can do
Load *;
SQL
SELECT DISTINCT top(1000) * FROM xyz;
IF you´re using:
Oracle:
SELECT * FROM TABLE where ROWNUM < 100;
SQL Server
SELECT top (100) * FROM TABLE
MySQL
SELECT * FROM TABLE limit 100
Hi Neil,
Are you working with SQL-Server? From wich Database do you connect your tables?
To answer your question:
To do it with preceeding load:
Tablename:
First 100
Load *;
SQL SELECT DISTINCT * FROM xyz;
What Db are you using?
Another way could be this
=if(aggr(rank(sum(DISTINCT Sales)),Dimension)<=100,Dimension)