Guys,
I got simple issue here,
The result is
I have tried decimal, real but still doesn't fix my problem.
Can anyone tell me ?
I got simple issue here,
Code:
DECLARE @Row_ID int,
@Vol float(2)
SET @Row_ID = 1
WHILE @Row_ID<=5
BEGIN
select @Row_ID Row_ID
SET @Vol = CASE
WHEN @Row_ID = 1 then '0.1'
WHEN @Row_ID = 2 then '0.25'
WHEN @Row_ID = 3 then '0.5'
WHEN @Row_ID = 4 then '0.75'
WHEN @Row_ID = 5 then '0.9'
ELSE 'Invalid Row ID'
END
select @Vol Volatility
SET @Row_ID = @Row_ID + 1
END
The result is
Code:
Row_Id
5
Volatility
0.89999998
I have tried decimal, real but still doesn't fix my problem.
Can anyone tell me ?