Reputation: 13
Can anyone please help me out with the warnings in the below query
CREATE FUNCTION MyRound(@Operand Float,@Places INT)
RETURNS Float
AS
BEGIN
DECLARE @x Float;
DECLARE @i INT;
DECLARE @ix Float;
SET @x = @Operand*Power(10,@Places);
SET @i=@x;
IF ((@i-@x) >= 0.5)
Begin
SET @ix = 1;
End
ELSE
Begin
SET @ix = 0;
End
END ;
SET @x=@i+@ix;
SET @x=@x/Power(10,@Places);
RETURN @x;
END
I am getting 3 different warnings
Upvotes: 0
Views: 1881