This is the original formula: a.arpAncho-(2*L.apzCalibre)-1
This is the interpreted formula: 983- (2 * 15) -1
There is a process that converts the field to Value. This works well. Receive the original formula and convert it into the interpreted formula.
I want to get the total of the operation: 983- (2 * 15) -1 = 952 all in millimeters.
Process A calls Process B. In process B the sp_executesql is executed, with which I want to find the total of the operation and return it to process A so that it executes other tasks.
In the SSMS it works well. But within process B it remains indefinitely looking for the total operation, which apparently is very simple.
This is the block of instructions that I am executing:
DECLARE @SqlString NVARCHAR (500)
DECLARE @ParmDefinition NVARCHAR (500)
DECLARE @Valor_Tmp Numeric (12,2)
SET @ SqlString = LTRIM (RTRIM (@ValorFrm))
SET @ParmDefinition = N '@Valor_OUT Numeric (12,2) OUTPUT'
EXECUTE sp_executesql @ SqlString, @ ParmDefinition, @Valor_OUT = @Valor_Tmp OUTPUT
SET @ Value = @ Valor_Tmp
The variable @ ValorFrm = 'SET @Valor_OUT = 983- (2 * 15) -1'
The variable @Valor is the output varible in the Process B for Process A.
a.arpAncho= Workpiece width
What am I skipping or don't know so that the instruction block works correctly in process B?
Thanks for your help. Greetings from Medellin, Colombia.