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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Last 1000 entries (SQL ... order by ID desc ...limit 1000)

Hi Everybody,

it is possible to get only the last 1000 entries?

In QV I just found the function FIRST (FIRST 1000 entries).

For testing for me is fine when I get my last 1000 entries.

In SQL:

select ID, Name, Store from mytable

order by ID desc

limit 1000

Thx in advance

2 Replies
perumal_41
Partner - Specialist II
Partner - Specialist II

Hi

Try This Script in Qlikview u get 100 rows

First (100) Select * from IE order by jobno desc;

Regards

Perumal 

jagan
Partner - Champion III
Partner - Champion III

Hi,

There is no such option to retrieve last n number of rows.  There is only option for first n number of rows.  To retrieve last rows then you need to use order by desc.

//Loads last 10 records

First (10)

Select * from Orders

order by ID DESC; (Note: The parenthesis is allowed but not required.)

//Loads first 10 records

First 10

Load * from abc.csv; 

Hope this helps you.

Regards,

jagan.