Hi Tore,
as we think alike,
>You separate the numeric part,
this is a nice doc for my idea ;-)
>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.
no need to use chrtran, as
a) val() works perfectly well on mixed strings [Val("135test...")] and
b) chrtran(field, "a..z"+"A..Z", "") might be problematic in cases like "10.20C05.12x0"
c) if a UDF is called, at least from pure perf the following is better (beauty in the eyes...)
Select somefunc1(yourfield, @Col2, @Col3, @Col4) as sort1;
, Col2 as sort2 ;
, Col3 as sort3;
, Col4 as sort4;
from yourtable into cursor yourcursor order by sort1,sort2,sort3,sort4
even faster but even less readable would be the filling of private array rows inside somefunc1
["very evil grin" tag suppressed by UT software]
regards
thomas