Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Order of a SQL on a SUM column
Message
From
07/04/2001 16:27:58
 
 
To
07/04/2001 16:20:30
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00493266
Message ID:
00493267
Views:
18
>How come on the following SQL:
>
>
>SELECT NOMEMBER2,SUM(POINT) AS POINT FROM POINT;
> GROUP BY 1 ORDER BY POINT DESCENDING INTO CURSOR TEMP
>
>
>I would end up with a sort with the following values in my POINT column: 10, 10, 2, 2, 12?
>
>The record with 12 as the POINT value should be ranked 1st.

Order by 2 solved it.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform