Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
How to take sum from two tables
Madhukumar Viswanathen
Sep 1 2011 7:56 AM
1.9k
Reply
Hai all
I have two tables. table1 and table2 as follows
Table1
id
date
amnt
1
01/01/2011
100
1
05/01/2011
100
1
10/01/2011
50
1
16/01/2011
500
1
17/01/2011
550
2
01/01/2011
10
2
15/01/2011
100
2
18/01/2011
800
2
20/01/2011
450
3
10/01/2011
15
Table2
id
nan
hnm
1
Madhu
Namparayil
2
Anoop
Puthenveettil
3
Dhanya
Payyampallil
I want id, nam,hnm, sum(amnt) of the above three customers as follows
1-Madhu - Namparayil - 1300
2-Anoop - Puthenveettil - 1360
3-Dhanya - Payyampallil - 15
Please give SQL command using c#
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Problem with crystalreport, doubling the records
Calculate baudrate from serialport!