Not overlooked. A serious oversight, for sure! If you have a large dataset, you can't limit, alas, alack! However you can use the Value List functions for getting the "top 25" results, for example, if you have Char(13) as your row delimiter.
This is noted in my article (PDF and example files)....
Would be sweet if SELECT TOP number|percent was functional in FMP SQL
<<insert SQL statement>>
; 1 ; 25 )
Wrap GetValues () around your SQL statement and you can specify any end number... 10, 15, 100. I use this a lot.
EDIT: GetValues is a custom function. Forgot to mention that.
Message was edited by: Ethan Shoshin
My understanding is with a true TOP or LIMIT, that once the required records are retrieved, the query ends. That has a great benefit to performance on tables with lots of records. That benefit doesn't exist with the GetValues() method.
The SQL call itself is usually pretty quick. I use this method to set global variables with subsets of information. These global variables are now really light (i.e. 15 rows) and work great for virtual lists.
WOW, Bev. This is exactly what I have been looking for ... a way to short circuit a query. Thank you so much!! You rock!!
Sorry but i have a basic question : why not LeftValues or MiddleValues built-in functions in this particular topic ?
Thank you for your further explanations.