Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TRIM commands ignored when applied to indexes?
Message
 
 
To
16/08/1999 12:49:27
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00254070
Message ID:
00254123
Views:
19
>Hi Mark,
>
>>You should only use TRIM in an index expression if you are concatenating 2 fields. Like Index on trim(FirstName) + LastName.
>
>I wouldn't put a trim there either. Just leave it
>
>
lname + fname
You'd have to pad lname with spaces on a seek where the variable didn't come from a field.

Actually, I very rarely create an index on more than 1 field. I also do not use TRIM. I only used it in my example in case the originator just has to use it. I agree with the points on its usage [or lack therof].

Since I use SQL and parameterized views, multi-field indexes are unnecessary. I do, however, make extensive use of UPPER on character fields like FirstName, LastName and City. If most users are like me, the more you let them type in a search value, the more likely they will have a typo. So, I have them search on some part of a lastname and present them with a pick list of matches to select the person they want.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform