Evaluating a string into a decimal type
Posted on 2001-09-03
This is my problem:
Server: Msg 8164, Level 16, State 1, Procedure proc_Evaluate_Formula, Line 73
An INSERT EXEC statement cannot be nested.
I have a procedure that calls another stored procedure. In the first procedure, I have an INSERT EXEC statement. In the seconde procedure, I also have an INSERT EXEC statement. Now, this is not allowed. Is there any other way to get around this?
In the second procedure, I use INSERT EXEC to evaluate a string that looks like this 'SELECT 100 + 200 + 300' to a decimal type in the table where I INSERT EXEC. This is done to evaluate '100 + 200 + 300'. Is there any other way to evaluate a string that looks similar to a formula into it's decimal value?