>>>>>Please create a sample with a cursor, then it's more realistic.
>>>>
>>>>
>>>>CREATE CURSOR MyCursor (HMF01 C(25), HMF02 C(25), HMF03 C(25))
>>>>INSERT INTO MyCursor (HMF01, HMF02, HMF03) VALUES ("m.KHour * 1100000 / 110", "1100000", "")
>>>>
>>>>m.KHour = 300
>>>>
>>>>FOR ncounter = 1 TO 3
>>>> STORE EVAL(EVALUATE("HMF" + PADL(ALLTRIM(STR(nCounter)),2,"0"))) TO nValue
>>>>
>>>> ? nValue
>>>>ENDFOR
>>>>
>>>>USE IN MyCursor
>>>
>>>This is a very good example of a very bad data design. Why store it that way????? If you have no control over this, then you must simply add a special handling of the first case.
>>
>>this is only an example :)
>>These three fields are actually different values that are calculated for different personnel.
>>Sometimes a staff member dose not takes a lot of money, sometimes takes a sum according to the formula and sometimes takes a fixed amount.
>
>If these are real samples, then the design it very bad in deed. For instance, you don't store a formula and/or variable names in a table. Period! You just don't!
>If the sample isn't realistic, please present a table/cursor with realistic values.
A friend at Foxite has suggested the following code
STORE EVALUATE(MAX(EVALUATE("HMF" + PADL(ALLTRIM(STR(nCounter)),2,"0")), "0")) TO nValue