h.tobisch (8/24/2016)
set arithabort offset ansi_warnings on
declare @i int = 1 / 0
declare @j-2 int = 1
set @j-2 = 1/0
select [@i]=@i , [@j]=@j --> yields @i = NULL, @j-2 = 1
I DID have arithabort off while having ansi_warnings on because 1 got this
-->
Msg 8134, Level 16, State 1, Line 4
Divide by zero error encountered.
Msg 8134, Level 16, State 1, Line 6
Divide by zero error encountered.
(1 row(s) affected)
AND this
-->
@i@j-2
NULL1
regards Herbert
Ok. Now set arithabort on as that first line in your test and re-run. How does the behavior / outcome change? For me, it doesn't. The behavior is the same between arithabort ON and arithabort OFF, even though @@OPTIONS does register the difference between ON and OFF for arithabort.
Take care,
Solomon..
SQL# — https://SQLsharp.com/ ( SQLCLR library ofover 340 Functions and Procedures)
Sql Quantum Lift — https://SqlQuantumLift.com/ ( company )
Sql Quantum Leap — https://SqlQuantumLeap.com/ ( blog )
Info sites — Collations • Module Signing • SQLCLR