nams
Old Hand
Points: 316
More actions
February 17, 2009 at 1:34 pm
#130984
in sql server 2005 i need to update a column of table from float to integer. How do I do it using either
conversion or cast or is there any other way??
Vic.K
SSC Eights!
Points: 970
February 18, 2009 at 1:58 am
#945726
There are some functions, you can use. Choose appropriate one:
declare @i int
declare @f float
set @f = 3.789
set @i = cast(@f as int)
select @i
set @i = round(@f, 0)
set @i = floor(@f)
set @i = ceiling(@f)
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply