Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Request for proper SQL
Table1 is the master table having account codes.
Table2 is the detail table with both the columns as the FK to Table1 having a account codes and sub-account codes.
Table3 is the transaction table with values against each Account code
I want a SQL statement to produce the result mentioned.
Table1
AcNo
A
B
X
Y
Z
Table2
AcNo SubAcNo X A X B Table 3 AcNo Value A 200 B 150 X 100 Y 300 Z 350 Required Result X 450 Y 300 Z 350
Result of X is ( 200 + 100 + 150)
Thanks in Advance
John
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Tue Jun 08 1999 - 07:41:50 CDT
![]() |
![]() |