Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to index
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00355970
Message ID:
00356595
Views:
8
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform