OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Add 15% to column?

From: Subscriptions (subscriptionssitecenters.com)
Date: Mon Oct 03 2005 - 12:35:23 CDT


Er... do you mean this instead?

UPDATE your_table
SET decimal_field = decimal_field + (0.15 * decimal_field);

Would this work?

Jenifer

----- Original Message -----
From: "Michael Stassen" <Michael.Stassenverizon.net>
To: "Subscriptions" <subscriptionssitecenters.com>
Cc: <mysqllists.mysql.com>
Sent: Monday, October 03, 2005 12:25 PM
Subject: Re: Add 15% to column?

> Subscriptions wrote:
>> I have a decimal field in my table... what would be the query to add 15%
>> to that number in every row? I need to mark the column up by 15% and want
>> to
>> make sure I get the query right the first time. heh
>>
>> Jenifer
>
> UPDATE your_table
> SET decimal_field = 1.15 * decimal_field;
>
> Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql