>>Oops forgot the other part of the question.
>>
>>Is it possible to make the field2 show in descending order.
>>like in:
>>select * from table1 order by nfield1 asc, nfield2 desc
>>
>>
>>???
>>Thanks
>
>How about:
>
>insex on padl(field1,10,"0") + padl(2147483647 - field2,10,"0") tag Test
>
>I think, it's not the best index from optimization point of view, but should work...
>
>I'm not sure, bintoc function produces ordered set... Help tells nothing about it, in few cases I just tried, it does follow the order.
>
>So, you may try index on bintoc(field1)+ bintoc(2147483647 - field2)
After reading Sergey's reply I see, that my advice was incorrect. Disregard it...
If it's not broken, fix it until it is.
My Blog