Thursday, February 26, 2015

XQuery syntax to evaluate math formula

The whole idea of putting formulas in table columns or whereever they is problematic. What if the formula does not parse at all?


Either use dynamic SQL - and accept that things explode somtimes. And, for that matter accept that you cannot use functions. (But given the risk for SQL injection, I don't like this.)


Or develop a full-blown parser for your formulas, and put this in a CLR module.


Your XQuery attempt is another dead end.





Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

No comments:

Post a Comment