And also...
-- To make result = 0 when @test-2 < 0
declare @test-2 int -7
select (ABS(@test)+@test)/2 as result
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills