Here is the proof - your use is shown in this post
returnsCode:Set NoCount On Declare @Test Table (Value int, Alert int) Insert into @Test values (10,0) Declare @Qty int Set @Qty=5 Update @Test Set Value=Value-@Qty, Alert=Case When Value<=0 Then 1 Else 0 End Select * From @Test Update @Test Set Value=Value-@Qty, Alert=Case When Value<=0 Then 1 Else 0 End Select * From @Test
Code:Value Alert ----------- ----------- 5 0 Value Alert ----------- ----------- 0 0




Reply With Quote