Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating column

Status
Not open for further replies.

Jim1515

Programmer
Nov 30, 2010
1
US
Hi,
I have question. I am using sql 2000 and need to make an update to below table. I need to update the numbers in column called amount2 using the login in column amount3.

can someone help?

A B C D
Customer Amount Amount2 Amount3
1) 101 33572.75 33572.75
2) 102 -36341.32 0 =C2+B3
3) 103 6317.85 0 0 =C3+B4
4) 104 -1218.18 0 =C4+B5
5) 105 -553.13 0 0 =C5+B6
6) 106 -1777.97 0 =C6+B7

Thnak you,
-Jim
 
Kinda confuesed by your post but I think you want something like....

update dbo.table
set amount2=amount2+amount3

Simi
 
Jim, do you need a running total?

What do you mean "login in column amount3"?

djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top