Re: it is broken
no it is not certain even with cte. m$ write-up say how to make it safe the only way. and it is not a bug say m$ it is <<by design>> so maybe in sql 2012 also.
2 publicly visible posts • joined 6 Mar 2012
this wont' work in sql 2008
select 1 / i from x where i <> 0
divide can be done before where part is checked and it happened to me so i know it.
also m$ admit it is true here http://msdn.microsoft.com/en-us/library/ms188295%28v=sql.100%29.aspx
they make it look hard to happen but its easy. they dont tell people about it. they say it is faster but it is broken.