Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Yet another 'Group By' question re SET EngineBehavior
Message
De
13/08/2005 10:06:08
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Yet another 'Group By' question re SET EngineBehavior
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Divers
Thread ID:
01040687
Message ID:
01040687
Vues:
56
In moving from SET EngineBehavior 70 to SET EngineBehavior 90 , I've encountered the same difficulties mentioned numerous times in this forum regarding the special attention necessary for the GROUP BY clause. I now understand the changes that are necessary when the old code fails, and have been happily making them as necessary.

However, I do have some instances where the old behavior worked very nicely, and I don't see an easy solution using the new behavior:
SELECT *, SUM(AMT) AS TOTAMT FROM Orders GROUP BY OrdNbr
The table "Orders", unfortunately, contains both parent records and child records. This particular selection would give me one record for each OrdNbr and all of the original fields from "Orders", so that I would, in effect, be creating the parent records (with the fields for what should have been child records containing irrelevant information.)

So, is it possible to achieve the same effect using the new behavior without enumerating all the fields in the GROUP BY clause? (I can do it by enumerating the fields, but I certainly would hope not to have to do so).

Thanks
Jim Nelson
Newbury Park, CA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform