Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexing with Numeric Fields
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00236640
Message ID:
00236654
Views:
14
Paul,

The solution to your immediate problem is to use the second argument for the STR() function which tells fox how many digits to use;

INDEX ON STR(AcctNo,3) + STR(OtherNum,2)

The more permanent solution is to change the data type of these fields as they are NOT numbers, but rather are strings of digits. The proof of this is this question, "When will you need to calculate the average or the sum of account number(s)?" If the answer is never, and it most likely is in this situation, then these fields are NOT numbers they a strings. Changing the data type will eliminate all of the str() stuff.
Previous
Reply
Map
View

Click here to load this message in the networking platform