In a column "SumStrings" of a table I have strings such as '1+2' or '1+2-3' like this:
SumStrings
1+2
1+2-3
In other words:
DROP TABLE IF EXISTS #theSums;
CREATE TABLE #theSums (SumStrings VARCHAR(25))
INSERT INTO #theSums
values
('1+2'),
('1+2-3');
How do I select from this table to give me the results of these sums? i.e. if only the above two strings were in the table then the result of the selection should be 3 and 0
This question String Expression to be evaluated to number is mainly directed to the creation of a function I would just like a simple script that selects from the table