I'm not sure I ever did this much, if any, and so it's been awhile since I thought much about this, but isn't it going to cause a problem if you create an index on an integer field where the index expression is ALLTRIM(STR(INTEGER_FLD))? That's going to create a variable length index, correct? And I'm not sure why you would index such a field - which is the PK in the table in question - on anything other than just the field itself (in other words, the index expression just contains the field name).
Russell Campbell