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 19:56:23
 
 
À
13/08/2005 16:45:27
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
OS:
Windows XP SP1
Divers
Thread ID:
01040687
Message ID:
01040744
Vues:
18
Fabio --

Yes, that seems to work all right.

Just out of curiousity, I don't understand the use "Orders" in the next to last line:
Orders GROUP BY OrdNbr) TGROUP
Curiously, it seems like any old name will work there, as long as something goes there. What's going on there?

Thanks,
Jim

>>No, I have to reason to believe that there is any such guarantee. While that would certainly be nice, I have to way of knowing whether that's true.
>>
>
>this is equivalent to VFP 70 ( but add a rn field ):
>
>SELECT TDATA.*,TGROUP.TOTAMT ;
>	FROM (SELECT *,RECNO() rn FROM Orders) TDATA;
>	JOIN (SELECT MAX(rn) rn ,SUM(AMT) TOTAMT FROM ;
>			(SELECT OrdNbr,RECNO() rn ,AMT FROM Orders);
>			Orders GROUP BY OrdNbr) TGROUP;
>	ON TGROUP.rn=TDATA.rn
>
Jim Nelson
Newbury Park, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform