Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ordering by Lookups
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00555016
Message ID:
00555022
Views:
18
Hi!

The best way is to use the query with ORDER BY and joined lookup table, or select fields from all joined lookups and index the result set (you can do this also as a view). Indexing on another tabe is not a good idea and also is dangerous because such indexes often got corrupted and you will not be able to open main table without opening of all other lookup tables.

In addition, you can use the INDEX command on the fly for that table and create temporary non-compound indexes in the external temporary CDX file:

INDEX ON ... TAG tmpTagName FILE tmpCDX

However, BEGIN TRANSACTION does not like such indexes...

HTH.

>Has anyone got a good solution for how best to order by a lookup table? Has someone written an article addressing this that I can read?
>
>I have the situation where my main table has 6 lookup tables any of which the user may wish to order by.
>
>I was always under the impression that you shouldn't create an index that ordered by a field in another table is this true - if so what is the best way of overcoming the above.
>
>Thanks in advance.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform