I didn't say val(). If you want to use val() then:
index on padl(int(VAL(right(bp_eng.engkod,2))),2,'0') + padl(int(VAL(left(bp_eng.engkod,6))),6,'0') tag kod
Otherwise say 00000105 and 00000204 both yield to 6 (5 + 1 and 4 + 2).
Cetin
>Thanks but..
>I use this one:
>index on VAL(right(bp_eng.engkod,2)) + VAL(left(bp_eng.engkod,6)) tag kod
>and it wont work.
>The firs tag seems to be OK but the second index tag doesn't. I have sequencies like this:
>00402005
>00401305
>00400805
>but I have no idea why.
>
>Tamas
>
>>>Hi,
>>>I would like to create an index from a field where the first six characters indicate the sequential number and the last two characters indicate the year. Is there any way to put these two numbers in one index field to see the field selected by the year in gorups and within this year groups the numbers are in sequence.
>>>TIA
>>>Tamas Szigeti
>>
>>index on right(myField,2)+left(myField,6) tag yearSeq
>>
>>Cetin