Multiple partial solutions exists like using “EXEC(Transact-SQL)” which is limited, cannot be used inside SELECT statement and lead to SQL Injection or using an homemade function which, most of time, fail at supporting simple operator priority and parenthesis.
SQL Eval.NET is a complete solution which, not only lets you evaluate dynamic arithmetic expression, but lets you use the full C# language directly in T-SQL stored procedures, functions and triggers.
SQL Eval - Arithmetic / Math Expression
You need to evaluate a dynamic arithmetic operation specified by a trusted user or check a dynamic rule.
- Dynamic report calculation field
- Dynamic report query filter
- Dynamic rule validation
Eval SQL.NET supports all C# operators including operators precedence and parenthesis.
Evaluating an expression is very fast and scalable. You can see performance 3-20x faster than User-Defined Function (UDF) and you can evaluate an expression as much as ONE MILLION times under a second.
SQL Eval - Dynamic Expression
You need to evaluate and execute a dynamic SQL expression which requires more than basic arithmetic operators.
Eval SQL.NET is flexible and supports almost all C# keywords and features including:
- Anonymous Type
- Generic Type
- Lambda Expression
SQL Eval - Framework class Library
You have a complex SQL and you know C# Syntax and C# Object could make this problem very easy.
- DirectoryInfo / FileInfo
- Access to C# Operators
- Access to C# Keywords
- Access to C# Objects
Getting better performance than User-Defined Function (UDF) and Table-Valued Function (TVF) is the Icing on the Cake!