﻿UPDATE csro SET C_TANEVID=csr.C_TANEVID 
FROM T_CSENGETESIREND csr
    INNER JOIN T_CSENGETESIRENDORA csro ON csro.C_CSENGETESIRENDID = csr.ID AND csro.C_TANEVID<>csr.C_TANEVID