SQLTeam.com | Weblogs | Forums

Remove .00 from float data type and set it to a whole number


#1

I have a SQL float data type column. values within that column could be 1.98, .08, 10.00.
What i would like to do is if i have a value lets say equals 10.00 i want to remove the .00 and set it to 10 i my have a value = 1.23 or .06. for those i want to leave them as is, only change the ones with a whole number followed by .00. so a case statement will work.

maybe (pseudo code) case when column1 = 10.00 then 10 else column 1 end


#3

You should do that in your presentation layer, not in SQL