You are almost there:

update people
set num = num + 5

That will work.

Cheers,

SAm


----- Original Message -----
From: "Bruce, Rodney S HQISEC/SIGNAL" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 4: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
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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

Reply via email to