Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select Bottom 'n' From...
Message
From
24/08/1999 14:44:08
Richard Hackett
Dr Dick's Software Inc
Edmonton, Alberta, Canada
 
 
To
24/08/1999 14:02:21
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00257214
Message ID:
00257244
Views:
16
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
Map
View

Click here to load this message in the networking platform