Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
An index problem
Message
From
02/01/2002 12:34:36
 
 
To
02/01/2002 12:28:24
Denis Filer
University of Oxford
United Kingdom
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00599805
Message ID:
00599810
Views:
14
Hi Denis,

You could use a view:
create sql view plantsByName ;
    as select a.*, b.name ;
    from plants a ;
    join plantNames b on (a.nameID = b.nameID) ;
    order by b.name
use plantsByName
>I have a Table A with a list of plants, each of which has a species name. The species name list is held in Table B. Table A has a numeric code relating to Table B. Table B is indexed on this numeric code to facilitate the relationship. All of this ... the most basic relationship between two tables.
>
>However, I want to list Table A sorted A-Z by species? Clearly, if I switch the Table B index to the species names sorted AZ, the relationship to A is lost. My work around for now is to include a (redundant)short species name field in Table A and to index on this. It works - but can't be the correct way.
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform