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
Title:
Indexing with Numeric Fields
Miscellaneous
Thread ID:
00236640
Message ID:
00236640
Views:
53
I am having a problem dealing with index's on numeric fields.

I have a chart of accounts file with three fields. 2 numeric fields coa_glno(ledger#) with a width set to 3 and coa_glsub(ledger sub#) with a width set to 2 and a character description field.

I have a candidate index called coa_glno with the following expression "str(coa_glno)+str(coa_glsub)". If I have a record in the table with a coa_glno of 123 and coa_glsub of 45 I notice that the index expression yields " 123 45". I am not sure why I have all of these leading spaces. This is causing great headaches in trying to do searches on this table with this particular index. I was considering using alltrim in the index. However, how would it distinguish between 123-45 and 12-345?

I am struggling with the best way to handle these indexes and then, also the best way to search on these indexes.

Thanks,
Paul Acton
Next
Reply
Map
View

Click here to load this message in the networking platform