What about something like this: UPDATEpeople SET num = (SELECT num + newnum AS SummedNum FROM people)
Matthieu -----Original Message----- From: Bruce, Rodney S HQISEC/SIGNAL [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 4:05 PM To: CF-Talk Subject: update table Hello all Is there any way of doing this in one query? i.e. I want to update a number field say people, If the current number in the table is 10 and I want to add 5 I can do two querys Select people.num from people update people Set num = (Q.num + newnum) have tried update people Setnum = (select num from people) + newnum can this be done in one query? thanks Rodney ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists