For a string '100+200', how to evaluate it?
'100+200'
I want to get 300the output.
300
DECLARE @expression VARCHAR(MAX) = '100+200' EXEC (N'SELECT ' + @expression)
If it comes from the user, make sure that it clears
Seriously? How about this:
SELECT 100 + 200;
Source: https://habr.com/ru/post/1680655/More articles:How can I display the details of an EKEvent prompt in my application using the EKEventViewController? - iosAttributeError: 'Tensor' object does not have '_keras_history' attribute - pythonTensorFlow: AttributeError: Tensor object does not have log10 attribute - pythonHow to select the next row so that it returns 3? SELECT '1 + 2' - sqlPython list comprehension => Ruby select / reject by index, not by element - arrayshow to create heatmap in ipyleaflet - ipythonMoment js - display days and hours from a date - javascriptConvert arithmetic formula in a string to values - sql-serverConvert strings with expression to decimal - sqlHow to make time.js show relative time in seconds? - javascriptAll Articles