Viewing 6 posts - 1 through 6 (of 6 total)
Update to anyone following this: this compile-time exception to normal T-SQL CASE short circuiting[/url] is now scheduled to be fixed in an upcoming SQL release, thanks to Gianluca for filing...
March 21, 2011 at 7:44 pm
Update: that exception to normal T-SQL CASE short circuiting[/url] should be fixed in an upcoming SQL release, per the Connect bug. It's still the behavior in SQL2005-SQL2008R2 (and maybe...
March 21, 2011 at 7:38 pm
FWIW I think CASE's implementation actually does guarantee both order of execution and predictable short circuiting at execution time. That doesn't prevent this error, though, because in this case the...
March 7, 2011 at 9:08 am
Agree it's an edge case & not representative of typical CASE behavior. I just updated my post to clarify that.
March 4, 2011 at 1:51 pm
This post seems to recommend CASE as a way to get deterministic short circuiting in T-SQL. Unfortunately, even CASE does not always provide deterministic order of evaluation with short circuiting....
March 3, 2011 at 12:56 pm
Be ware that even CASE does not always provide deterministic order of evaluation with short circuiting. See http://bartduncansql.wordpress.com/2011/03/03/dont-depend-on-expression-short-circuiting-in-t-sql-not-even-with-case/[/url]. (It'll probably work for the example shown above, but be aware...
March 3, 2011 at 12:51 pm
Viewing 6 posts - 1 through 6 (of 6 total)