Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TRIM commands ignored when applied to indexes?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00254070
Message ID:
00254125
Views:
19
>Hi All:
>
>If I have an index on some field and the expression I'm searching for using SEEK() has leading or trailing blanks, I don't get a match. If I try an alltrim on the search expression and the index key, I still don't get a match. I appears that TRIM commands are ignored in index expressions.
>

You'd need to create an index based on the trimmed expression, and there are some problems doing that as well (VFP index expressions need to be fixed length, so you'd need to build an expression on PADR(ALLTRIM(char expression),fixed expression length) to ensure that VFP built the index properly (lots of funny things can happen if you create an index expression initially and the size of some key value added later exceeds the max length from index creation.)

You can build an index one way, and then later selectively apply an expresion to the implemented index.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform