|
-
help please
hi, this instance multiple tables (for example, 3 tables) how-to.
SELECT C_TABLE.ID, C_TABLE.NAME, A_TABLE.ID, B_TABLE.SESSION , SUM(B_TABLE.DEPT_TOTAL), SUM(B_TABLE.ARREARS_TOTAL)
FROM A_TABLE , B_TABLE , C_TABLE
WHERE B_TABLE.A_TABLE_ID = A_TABLE.ID
AND B_TABLE.C_TABLE_ID = C_TABLE.ID
AND B_TABLE.C_TABLE_ID = A_TABLE.C_TABLE_ID
AND A_TABLE.CLOSED = ‘O’
AND B_TABLE.YEAR = ‘2012’
AND C.TABLE.ID = ‘2277’
GROUP BY C_TABLE.ID, C_TABLE.NAME, A_TABLE.ID, B_TABLE.SESSION
ORDER BY B_TABLE.SESSION
;
C_TABLE.ID C_TABLE.NAME A_TABLE.ID B_TABLE.SESSION B_TABLE.DEPT_TOTAL B_TABLE.ARREARS_TOTAL
2277 MR.J**** 7222 1 45,24 0
2277 MR.J**** 7222 2 45,24 0
2277 MR.J**** 7222 3 45,24 0
2277 MR.J**** 7222 4 45,24 45,24
2277 MR.J**** 7222 5 45,24 45,24
2277 MR.J**** 7222 6 59,54 59,54
I want to report
B_TABLE.SESSION
C_TABLE.ID C_TABLE.NAME A_TABLE.ID 1 2 3 4 5 6
2277 MR.J**** 7222 45,24 0 45,24 0 45,24 0 45,24 45,24 45,24 45,24 59,54 59,54
thanks....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|