Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Correct Sql Part 2
Message
From
01/06/1999 08:34:34
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordan
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Need Correct Sql Part 2
Miscellaneous
Thread ID:
00224853
Message ID:
00224853
Views:
57
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
Next
Reply
Map
View

Click here to load this message in the networking platform