just do update my_table set people = people + myNewNum where people = 10
Douglas Brown Email: [EMAIL PROTECTED] ----- Original Message ----- From: "Bruce, Rodney S HQISEC/SIGNAL" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, July 10, 2002 1:04 PM 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/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

