Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can ALLTRIM on an index field cause problems?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00482253
Message ID:
00483428
Views:
10
Make sure if you use ALLTRIM (or trim in any fashion actually) that you also pad the expression. Otherwise, FP use the first record it looks at to determine the index tag length, and you can end up cutting off part of what you want. I usually recomment that you use the PADR(ALLTRIM(expression),xx) where xx is the length required to make sure that the longest length you might get in your data will be in the index.

>I read that ALLTRIM on index fields can cause data corruption problems. Is this true? I have ALLTRIMs in many of my applications indexes. And some of the indexes use LTRIM RTRIM to accomplish the same thing. Is this better procedure: INDEX ON LTRIM(RTRIM(CODE_ID))+LTRIM(RTRIM(CODE))TAG ID_CODE
>
>Thanks
>
>Brenda
Cy Welch
Senior Programmer/Analyst
MetSYS Inc
Previous
Reply
Map
View

Click here to load this message in the networking platform