To evaluate the contents of a record like this you would have to use dynamic SQL.
declare @MyLinearFormula VARCHAR(5000)
declre @script VARCHAR(8000)
declre @Return DECIMAL(16,8)
Select @MyLinearFormula = LinearFormula
FROM MyTable
SELECT @script = 'SELECT @return = ' + @MyLinearFormula
EXEC sp_executesql @script, N'@return DECIMAL(16,8) OUTPUT', @return OUTPUT
Main Topics
Browse All Topics





by: adwisemanPosted on 2005-10-26 at 13:06:23ID: 15166096
Short answer, you can't. At least not like your thinking.