>It's documented change in the SQL Engine behavior: ORDER BY clause cannot include field that it's not in the field list if DISTINCT is used. You can add OrderMain to the field list.
SELECTDISTINCT Numero, OrderMain FROM Temp ORDERBY OrderMain INTOCURSOR Temp2
By doing this, I have no bug. But, the SQL result is double and that fakes the result I need to achieve.