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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Complex UPDATE problem.

Status
Not open for further replies.

haqyunus

Programmer
Jun 24, 2003
11
PK
Helo,
I have a complex UPDATE problem.
Suppose i have a table 'tblA' and there is a column 'ColA' in it. Now when i update a single cell of 'ColA' of a certain row of 'tblA' with 'newvalue', i also want to update (at the same time) the rest of the column 'ColA'(of rest of the rows) with 'newvalue/2'. How can i do this?

what i mean is:
UPDATE tblA
SET ColA = newvalue

--This will update the rows of 'tblA' one by one row,now i want to update the rest of the column 'ColA' too before moving on to the next row. Sort of a recursive problem?

Please help. I will be very obliged.
Thanks Haq.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top