Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameters for Order by in SQL?
Message
 
À
30/08/1998 10:04:20
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00131023
Message ID:
00131354
Vues:
15
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform