Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TRIM commands ignored when applied to indexes?
Message
From
16/08/1999 12:28:28
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00254070
Message ID:
00254106
Views:
24
An index an you descible would not be reliable. I might have a firstname + lastname that when concantenated look like another firstname + lastname, since there is no seperation of the fields.
Jimmy Evans = Jim Myevans--not that it's likely.
I still think the best advice is never TRIM in index expressions. If you have Values from the interface to match, PADR() them to the proper spacing.

>You should only use TRIM in an index expression if you are concatenating 2 fields. Like Index on trim(FirstName) + LastName. Otherwise, TRIM is not needed. You should also check settings for SET EXACT, SET COLLATE [among others] because these are scoped to each datasession. See SET DATASESSION in VFP Help for all SETs that are scoped to the DS.
>
>Alos, on character data, you may consider using the UPPER or LOWER function to make SEEKs and LOCATEs case insensitive. Of course the parameter you are pasing needs to be converted to UPPER or LOWER, depending on the index.
Charlie
Previous
Reply
Map
View

Click here to load this message in the networking platform