tags:

views:

58

answers:

2

How do I replace all numbers in a column of a table to divide my 0.6. Let's say the column reads:

1
2
3

I want it to become:

0.6
1.2
1.8
+3  A: 

Go to the SQL view and type:

select columnname*0.6 from tablename

Replace columnname and table with your table/column names. By the way, that's multiplying by 0.6, not dividing.

Seva Alekseyev
If this works, you SO saved me 18 friking hours of work! HAHA
Will Fix
@user425815 .. I pray it to god you were not working on that for 18 hours.
John Hartsock
+2  A: 
UPDATE mytable
   SET mycolumn = mycolumn * 0.6;
Adam Bernier
Assuming the column is of type DECIMAL.
onedaywhen
Doesn't the precision of the Decimal column also come into play?
David-W-Fenton
Worked like a charm! :) Thank you sir.
Will Fix