Sure it will. But if you have primary key and site code in separate fields I would just go for two simple indexes on them without any ALLTRIM(... stuff.
>Site code is a seperate field, but not currently indexed. Would it help to index it?
>
>>>I have an application that was single site and had unique inventory numbers as the primary key. The application has to become multi site and the primary key will be ALLTRIM(inventory number) + sitecode (site code is 1 character). For many forms I will need to be able to retieve inventory records
ONLY for that site. What is the best way to do this?
>>
>>Hmmm, maybe something like this:
>>
>>SELECT * from mytable where RIGHT(my_primary_key, 1) = "7"
>>
>>
>>The better way might be to make the site key the separate indexed field.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison