Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to GROUP BY ....
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Divers
Thread ID:
01531746
Message ID:
01531757
Vues:
45
>You're grouping on field Dtyme from the cursor not on the expression. In VFP SQL Statement a field oways wins over alias in GROUP or SORT by
>Change the alias so it doesn't match the field name.


BINGO!

I improved the code like this:
>>SELECT LEFT(Dtyme,18) AS Dtyme2, AVG(DCreading) AS DCreading, ;
>>	SPACE(10) AS cDate, SPACE(8) AS cHourMin ;
>>FROM CPdata  WHERE RType=[DC] ;
>>	GROUP BY Dtyme2, cDate, cHourMin  ORDER BY dTyme ;
>>	INTO CURSOR CPchart  READWRITE
>>BROWSE  TITLE [Data to Chart]
>>
Thanks mucho! Screenshot attached.
Randy Bosma
VFP - Because life is too short to code in something else...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform