Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The best way to use a portion of a field for indexing
Message
From
11/01/2005 05:54:46
 
 
To
11/01/2005 03:07:57
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00975802
Message ID:
00975969
Views:
33
>Hi Walter,
>
>yes, but it your case, why? INDEX ON FirstName-LastName gives EXACTLY the same result! One of the little used features of xBase.

This is not true:
FirstName-LastName 
is
PADR(RTRIM(FirstName)+LastName,FSIZE(FirstName)+FSIZE(LastName))
>
>OK, I admit I should have use the word "as", and not "in". 'Never use alltrim as an index expression. Thank you for the correction.
>
>>Hi Tore,

Then:

Never use LTRIM()
Never use RTRIM()
and then
NEVER USE OF A VARCHAR FIELD ON VFP9 !

The issue appear when you use this into a primary/candidate index,
and this is true for cExp1-cExp2 also.

For a search text index, ALLTRIM(),LTRIM()... can to be used without problems.

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform