On my local copy of a database, the code below sometimes generates an arithmetic overflow error and very occasionally generates a domain error. When I run the same code on a server, it never generates an error. I am completely perplexed.In the code below, I create the table to be used in the join and then have a loop to repeat the join a large number of times.create table x(a smallint)declare @a smallintset @a = 1990while @a <= 2012begin insert into x select @a as a set @a=@a+1enddeclare @i intset @i = 0while @i < 200000begin select 0.0 + cast(power(cast(0.7000000 as float), abs(y.a- b.a)) as decimal(10, 7)) as w into #x from x y inner join x b on b.a between y.a - 4 and y.a + 4 drop table #x print(@i) set @i = @i+1end