You might find something like this a
little faster
Select
R1=ISNULL(R1,0),
R2=COALESCE(R2,R1,0),
R3=COALESCE(R3,R2,R1,0),
R4=COALESCE(R4,R3,R2,R1,0),
R5=COALESCE(R5,R4,R3,R2,R1,0),
R6=COALESCE(R6,R5,R4,R3,R2,R1,0)
From R
See
COALESCE (Transact-SQL) | Microsoft Docs[
^]
On the whole though, I agree with Dave Kreskowiak - your database design and/or your data entry need some attention