September 1st, 2003, 07:39 PM
Converting a table datatype from float to decimal
I want to switch a data type in a table from float to decimal to get rid of some evil rounding errors. How do i do it without rounding all the values to whole numbers? I'm using enterprise manager to edit my tables.
November 14th, 2003, 11:23 AM
never tried, but if simply changing the datatype to decimal rounds everything off to whole numbers, i would create a new table, delete the old table and then rename the new one to match the old one... may not be the best way but it should work.
select column1, column2, convert(decimal(5,2), column3)