Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Calculations From Two Different Tables and then Sending Back the Result

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-03-01 : 08:43:16
Dwayne Lessner writes "Hello there

Heres is the background of my problem

Two Tables

table a
ID
numbera

table b
ID
numberb

ID is the primary key for both tables and has the same value for both tables. Numbera and Numberb get added and then i need to send the value from the addtion associated with the ID back.
It would be appericated if someone could give me some ideas.

Thanks

Dwayne Lessner"

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2002-03-01 : 11:15:08
SELECT a.ID, numbera + numberb AS sum
FROM a INNER JOIN b ON a.ID = b.ID


Go to Top of Page
   

- Advertisement -