Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameters for Order by in SQL?
Message
 
To
30/08/1998 10:04:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00131023
Message ID:
00131354
Views:
14
>This is from a real app :
SELECT irsno, urun, ;
>        SUM(adet) as adet, ;
>        SUM(kilo) as kilo, ;
>        .T. AS dummy ;
>	FROM fatview ;
>	WHERE !EMPTY(irsno) ;
>	GROUP BY irsno,urun ;
>        ORDER BY 4 ;
>        INTO CURSOR q1  && I needed ordering by sum(weight-kilo)
Cetin

Hidy Cetin,

That's what I expected. In your example, you're actually in control of what field 4 is. I produce a number of different summary reports (groupings). In each case the group and order by states are controlled by macro substitution, and single (well, because of the complexity of the summaries, three) SQL statements are used (two to create the date, and a third to join result sets).
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform