Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group By does not return right result with multiple tables
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Group By does not return right result with multiple tables
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01186807
Message ID:
01186807
Vues:
98
Hi everyone,

I am running the following select statement:
Select Trans.cTrans_fk, Sum(Payments.yAmount_paid) as yAmount_paid, ;
Sum(Charges.yCharges_amount) as yCharges_amount ;
from Trans inner join Payments ;
on Trans.cTrans_pk = Payments.cTrans_fk ;
inner join Charges ;
on Trans.cTrans_pk = Charges.cTrans_fk ;
group by 1
If I join two tables I have the right result but with three tables.
Is there a problem joining more than two tables and using group by?

Thanks.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform