Page 1 of 1

update a record with a calculation

Posted: Tue Dec 12, 2006 1:55 pm
by dstefani
Hi,

Can I update a price (lower by a percentage) while running an update.

IE: update table SET price = price - (3/100)*price)

So far I can't get this to work, and something tells me I won't. <?>

Thanks,

DJ

Posted: Tue Dec 12, 2006 2:40 pm
by wtf
That should work just fine.

Posted: Tue Dec 12, 2006 5:40 pm
by feyd
Yeah, it should work... although your post may suggest you have a syntax error -- extra parenthesis.