TSQL Challenge 48 - Parse and evaluate Arithmetic Expressions using TSQL
The primary goal of this challenge is to demonstrate the power of Recursive CTEs introduced in SQL Server 2005. Recursive CTEs allow you to implement almost any algorithm in a single TSQL statement. This challenge is to parse and evaluate arithmetic expressions using TSQL.
http://beyondrelational.com/blogs/tc/archive/2011/01/24/tsql-challenge-48-parse-and-evaluate-arithmetic-expressions-using-tsql.aspx