kausmail (1/10/2012)
This is working but I am looking soothing like a scaler function that can be used in Select statement. Any idea?select ..., dbo.fnExpressionToValue(Expr)
from myTable
That's a different requirement to the one you originally stated.
In this case, you'd have to use a CLR as you can't execute a string in a function. If you need help writing one (and someone else doesn't post one in between), I'll knock up a simple one later on today.