select T.id,T1.IsFinalStatus_FirstLevel,T.IsFinalStatus_SecondLevel,T1.IsFinalStatus_SecondLevel As Change
from IGRS_Report..tbl_Complaints_CompiledStatus T inner join IGRS_Report..tbl_Complaints_CompiledStatus T1
On T.ComplaintCode=T1.ComplaintCode and T1.IsFinalStatus_SecondLevel='ATRS' and T1.IsFinalStatus_FirstLevel <> 'ATRS'
and T1.ComplaintCode=10159160008930
and T.id >=T1.id
----------------------Update----------------------------------
Update
T set
T.IsFinalStatus_FirstLevel=T1.IsFinalStatus_SecondLevel
from IGRS_Report..tbl_Complaints_CompiledStatus T inner join IGRS_Report..tbl_Complaints_CompiledStatus T1
On T.ComplaintCode=T1.ComplaintCode and T1.IsFinalStatus_SecondLevel='ATRS' and T1.IsFinalStatus_FirstLevel <> 'ATRS'
and T1.ComplaintCode=10159160008930
and T.id >=T1.id
from IGRS_Report..tbl_Complaints_CompiledStatus T inner join IGRS_Report..tbl_Complaints_CompiledStatus T1
On T.ComplaintCode=T1.ComplaintCode and T1.IsFinalStatus_SecondLevel='ATRS' and T1.IsFinalStatus_FirstLevel <> 'ATRS'
and T1.ComplaintCode=10159160008930
and T.id >=T1.id
----------------------Update----------------------------------
Update
T set
T.IsFinalStatus_FirstLevel=T1.IsFinalStatus_SecondLevel
from IGRS_Report..tbl_Complaints_CompiledStatus T inner join IGRS_Report..tbl_Complaints_CompiledStatus T1
On T.ComplaintCode=T1.ComplaintCode and T1.IsFinalStatus_SecondLevel='ATRS' and T1.IsFinalStatus_FirstLevel <> 'ATRS'
and T1.ComplaintCode=10159160008930
and T.id >=T1.id