Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Correct Sql Part 2
Message
De
01/06/1999 08:34:34
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Need Correct Sql Part 2
Divers
Thread ID:
00224853
Message ID:
00224853
Vues:
58
I've 3 tables :-

ACTRANS -> Parent of Actr2,
ACTR2 -> Child of Actrans, 1 to Many Relation

ACGLMST -> General Ledger codes, both files are having code fields and taking description etc. from this table

I need report in this format :-

Account Wise Summary
=====================

A/c Code, Description, Debit Amt, Credit Amt


Currently I'm using 2 sqls to generate output for this.. can somebody advs. me a better way to do it..

SELE trans_codefk, glmst_name, sum(TRANS_AMT) ;
FROM ACTRANS, ACGLMST WHERE TRANS_CODEFK=acglmst.GLMST_CODEPK ;
group by trans_codefk

SELE tr2_code, glmst_name, sum(TR2_AMT) ;
FROM ACTR2, ACGLMST WHERE TR2_CODE=acglmst.GLMST_CODEPK ;
group by tr2_code
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform