Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to index
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00355970
Message ID:
00356595
Vues:
9
>>The one exception that comes to mind is a Last name, first name lookup where I have used TRIM(LNAME)+", "+FNAME as the key. I guess, in this case, it doesn't matter that there are trailing spaces added by VFP in the index.
>
>Hi Larry,
>
>Wouldn't this return a variable length string? What happens if your first key is
>"Moore, Demi " and your second key is
>"Schwartzenegger, Arnold "
>
>My guess that in order to pull this off you'd have to use something like:
>
>padr( trim(lname) + ", " + fname, 50)
>
>assuring constant key length through the table.
>
>Did I miss anything?
>
>Alex

I believe VFP would add the trailing spaces as mentioned earlier.

BTW, the purpose of such an index would only be to provide a lookup where the user is entering the name to find. I would never use this kind of index internally (for a relation, etc.)

HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform