When I try to create my stored procedure, I get an error saying there is a problem, which I've narrowed down to the part where I try to set the value of a float variable based on the value of a different text variable. Any comments on what I'm doing
wrong?
DECLARE @txtVar nvarchar(4000)
DECLARE @floatVar float
....
(code gets the value of @txtVar and sets it)
...
(now I'm trying to test if the value of @txtVar is numeric, and if it is, to set the @floatVar as that numeric value)
IF ISNUMERIC(@txtVar) = 1
BEGIN
SET @floatVar = CAST(@txtVar as float)
END
Gina