starsky51
MIS
- Mar 11, 2002
- 91
I am trying to set up a function which takes a string containing a set of conditions and returns a bit to indicate whether the condition is true or false. Basically, I need something similar to the Javascript eval() function.
eg. INPUTSTRING='((5 = 5) AND (40 = 40))', RESULT=1
INPUTSTRING='((5 = 3) AND (40 = 40))', RESULT=0
The only way I can see of doing this is using sp_executesql, but this causes problem when included in a function.
Anyone know a simple way of doing this?
eg. INPUTSTRING='((5 = 5) AND (40 = 40))', RESULT=1
INPUTSTRING='((5 = 3) AND (40 = 40))', RESULT=0
The only way I can see of doing this is using sp_executesql, but this causes problem when included in a function.
Anyone know a simple way of doing this?