General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only