General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Yes that is a good idea. But... Error 1806 results when I try it. (column not found) SQL won't use UDFs in the ORDER BY clause. From Help: ...can be one of the following:
A field in a FROM table that is also a select item in the main SELECT clause (not in a subquery).
A numeric expression indicating the location of the column in the result table. (The leftmost column is number 1.)
So probably BOTTOM 'n' this way is not possible unless one adds and maintains an inverted column for each original column in the table which we want to ORDER BY, or as Doug Dodge suggests here msg #257237 , maintain an index for any column we want to do this on. I was hoping to use this in a dialog which applies to various tables to allow users to create their own views, so maintaining these indexes may be the cost of this feature. I wonder if any other SQL implementations allow BOTTOM 'n' without indexes, I have not heard of that. Thanks anyhow.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only