General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Need Correct Sql Part 2
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only