# Mathematical addition to Value2 in table2 from value1 in table1

Page 1 of 1

## 1 Replies - 833 Views - Last Post: 08 August 2012 - 05:43 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=288347&amp;s=c35e586ee910ca3d0dbaa181f2931d1b&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 UltraWhite

Reputation: 0
• Posts: 15
• Joined: 08-August 12

# Mathematical addition to Value2 in table2 from value1 in table1

Posted 08 August 2012 - 05:30 PM

Is there a simple way to add a Value from one table to another, for every record in [table2]
Basically I am trying to do this

Psuedocode:
```table1.value1 = table1.value1 + table2.value2 WHERE Table2.column = Table1.column

```

I'm a little rusty on SQL but I'm having quite a bit of trouble with this. Thanks!
Sincerely,
UltraWhite
Is This A Good Question/Topic? 0

## Replies To: Mathematical addition to Value2 in table2 from value1 in table1

### #2 modi123_1

• Suitor #2

Reputation: 10374
• Posts: 39,953
• Joined: 12-June 08

## Re: Mathematical addition to Value2 in table2 from value1 in table1

Posted 08 August 2012 - 05:43 PM

Yeah.. you would use an update statement... and a join off that table..

see the msdn example:

http://msdn.microsof...y/ms177523.aspx