November 25, 2004 at 9:08 am
hey all
there seems to be two different results for the following queries.
a) select round(101.2345,2)
b) declare @var int
set @var = 101.2345
select round(@var,2)
can u explain why there happens to be two different results
thanx
Rajiv.
November 25, 2004 at 9:29 am
You can't declare int type since it is Integer (whole number), Use declare @var decimal (7,4).
November 25, 2004 at 9:55 am
hey allen
i think even if i declare it as decimal .....i get different results....why?
i did::::
declare @var decimal
thanx
Rajiv.
November 25, 2004 at 1:13 pm
you must specify the precision :
declare @var decimal (7,4)
November 26, 2004 at 9:30 am
hey all
thanx for ur help...now i got it
thanx
Rajiv.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply