declare @a varchar(40)
set @a='1.23e-4'
declare @b decimal(27,12)
if isnumeric(@a) =1
begin
select @b=cast(@a as decimal(27,12))
end
else
begin
select @b=-1
end
select @b
when exeucting above sql code under SQL 2005 environment I am getting following error.
Error converting data type varchar to numeric
anyone knows why?
thanks.