SQL Eval Function A SQL Eval function to execute C# directly in T-SQL

-- Evaluate dynamically expression in T-SQL
DECLARE @tableFormula TABLE (
   Formula VARCHAR(255), X INT, Y INT, Z INT
)

INSERT INTO @tableFormula VALUES ('x+y*z', 1, 2, 3 ), 
                                ('(x+y)*z', 1, 2, 3 )
-- SELECT 7
-- SELECT 9
SELECT SQLNET::New(Formula)
              .ValueInt('x', X)
              .ValueInt('y', Y)
              .ValueInt('z', Z).EvalInt() as Result
FROM @tableFormula

What's Eval-SQL.NET?

What's Eval-SQL.NET?

SQL Eval Function is a C# expression evaluator. You can evaluate arithmetic expressions, regex, and more directly in T-SQL.

Do you offer a free trial?

Do you offer a free trial?

We offer monthly trial, you can download a new trial every month.

Where can I find online examples?

Where can I find online examples?

Just click on Run button!

Our achievements


customers 5,000+ Customers
countries 75+ Countries
requests 10,000+ Requests closed
downloads 250,000,000+downloads

What ZZZ Projects achieved over the last decade has grown beyond our hopes. We help developers worldwide with free and paid solutions (because nobody works for free, nor our developers!). Every day, we are committed to listening to our clients to help ease the daily dev workload as much as possible.