Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New SQL: What's with the GROUP BY error?
Message
 
À
25/11/2003 12:48:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00853362
Message ID:
00853398
Vues:
12
>to reiterate: As you said, VFP8 follows standard SQL, so all non-aggregate columns in the select list must be in the group by list, and they are not, hence the error.
>in this example's group by clause, you would need to list all the columns in Detail by name, and Codes.desc

Yup, makes sense...technically. This is legacy code I was attempting to diagnose via the Query Designer. Orignal programmer probably didn't *need* to use Detail.* (IOW coulda used Detail.bccode) but I don't wanna root through all code to be certain when the SET ENGINEBEHAVIOR 70 option exists.

If starting with new code, I'd use the (below).

Thanks Trey,
Steven-

-------------------------------------
SELECT Detail.bccode, count(*) as Total, Codes.desc;
 FROM ;
     detail ;
    LEFT OUTER JOIN codes ;
   ON  Detail.bccode = Codes.code;
 GROUP BY Detail.bccode, Codes.desc;
 ORDER BY Detail.bccode
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform