Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GROUP BY clause is invalid
Message
De
06/08/2007 02:49:25
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01245947
Message ID:
01246082
Vues:
59
hi,
thank you for reply,
Though in your case it may be better to add these fields to GROUP BY? yes



>I don't understand why it didn't work as you wrote, since SET ENGINEBEHAVIOR 70 allows you to run wrong (old style) queries. See my FAQ for eliminating duplicates, I used SET ENGINEBEHAVIOR 70 there.
>
>Though in your case it may be better to add these fields to GROUP BY.
>
>>hi,
>>thank you very much, it works
>>
>>>You have to include all none-aggregate fields from the SELECT field list into the GROUP BY clause. See Re: Change in SQL commands! Thread #941771 Message #941774 for more detauls.
>>>
>>>GROUP BY nam,bank,sheqno,dat
>>>
>>>>
>>>>thanks for idea ,help
>>>>
>>>>i try to run this code i got error message...
>>>>
>>>>SQL: GROUP BY clause is missing or invalid
>>>>
>>>>
>>>>SET ENGINEBEHAVIOR 70
>>>>*| 80 | 90
>>>>
>>>>LOCAL ldStart
>>>>
>>>>ldStart = DATE()
>>>>SELECT nam,bank,sheqno,dat, SUM(amount) AS bill_total FROM Mstr ;
>>>>WHERE DAT1= ldStart ;
>>>>GROUP BY sheqno ;
>>>>      ORDER BY sheqno INTO CURSOR qTmp
>>>>SELECT csrBillTotals
>>>>ZAP
>>>>APPEND FROM DBF( [qTmp] )
>>>>go top
>>>>Thisform.grid1.refresh()
>>>>
>>>>REPORT FORM  allbills preview
>>>>
>>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform