How to create the SELECT script?

From: Violin <violin.hsiao_at_mail.pouchen.com.tw>
Date: Wed, 12 Aug 1998 09:00:31 GMT
Message-ID: <35d359aa.33195495_at_news.twsc.pouchen.com.tw>



Hello,
I have a select problem,I hope someone could help me!

There are 2 tables:TABLE1 is master,TABLE2 is detail. And the data is:

TABLE1:
ACC_NO ACC_NM


10                Training cost
20                Traffic cost 
30                Medical cost
40                Sale cost
50                Manage cost
60                Telecom cost

TABLE2:
ACC_DATE ACC_NO AMT


960101            10                  100
960101            20                  200
960103            30                5000
960105            10                   400
960109            50                1000

How could I do for the result:
ACC_NO  ACC_NM               TOTAL

---------------------------------------------------
10 Training cost 500 20 Traffic cost 200 30 Medical cost 5000 40 Sale cost 50 Manage cost 1000 60 Telecom cost

Please give me some suggestions for the select statement, I'll very appriciate for your help!
Please Cc to : violin.hsiao_at_mail.pouchen.com.tw,Thank you so much :) Received on Wed Aug 12 1998 - 11:00:31 CEST

Original text of this message