
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First (100) SQL Select Distinct
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
- « Previous Replies
-
- 1
- 2
- Next Replies »

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can debug and limit the load on 100 rows.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this:
SQL SELECT DISTCINT *
FROM xyz
WHERE ROWNUM <= 1000;
Other options can be found here: SQL SELECT TOP, LIMIT, ROWNUM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Similar to what Sunny T said, try:
LOAD *;
SQL SELECT DISTINCT TOP 1000 *
FROM xyz;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or you can do
Load *;
SQL
SELECT DISTINCT top(1000) * FROM xyz;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
IF you´re using:
Oracle:
SELECT * FROM TABLE where ROWNUM < 100;
SQL Server
SELECT top (100) * FROM TABLE
MySQL
SELECT * FROM TABLE limit 100

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Neil,
Are you working with SQL-Server? From wich Database do you connect your tables?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To answer your question:
To do it with preceeding load:
Tablename:
First 100
Load *;
SQL SELECT DISTINCT * FROM xyz;
What Db are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another way could be this
=if(aggr(rank(sum(DISTINCT Sales)),Dimension)<=100,Dimension)

- « Previous Replies
-
- 1
- 2
- Next Replies »