Then you can't have done as I explained? You do all this in ONE operation, either with inline functions or with separate functions. By the way, I got another solution. You separate the numeric part, by using chrtran(), and convert it into a numeric value. Then you use int() on this value to separate the first part. The remainder is the second value to sort on.
I don't have the time to help you more right now, but if you could send me a private email with some test data, I can make a solution for you later today.
>You mean somefunc? Yes. But I would end up with 21 sort fields.
>
>>What I call yourfuncx() could probably be inline functions.
>
>>>>I suggest that you select into a cursor, something like this semicode
>>>>Select *,;
>>>> somefunc1(yourfield) as sort1,;
>>>> somefunc2(yourfield) as sort2,;
>>>> somefunc3(yourfield) as sort3,;
>>>> somefunc4(yourfield) as sort4;
>>>> from yourtable into cursor yourcursor order by sort1,sort2,sort3,sort4