Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Incompatibility with VFP 9
Message
 
 
To
14/01/2005 11:55:32
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00977235
Message ID:
00977242
Views:
20
This message has been marked as the solution to the initial question of the thread.
>>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.
SELECT DISTINCT Numero, OrderMain FROM Temp ORDER BY OrderMain INTO CURSOR Temp2
>
>By doing this, I have no bug. But, the SQL result is double and that fakes the result I need to achieve.

Woud this work?
<pre>SELECT Numero, MAX(OrderMain) SortOrd FROM Temp ;
GROUP BY Numero ;
ORDER BY SortOrd ;
INTO CURSOR Temp2
If it doesn't, can you provide more info about data you're processing and result you want.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform