I have a table that contains three user ID columns and an Active column
Table1
userID1
userID2
userID3
Active
I want to set each row to be inactive (Active = 0) where given two UserIDs exist in the same row. Whats the fastest and most logical way to achieve this?
Thanks!
EDIT: Sorry I should have been a bit more clear in my question. UserID1,2 and 3 will ALWAYS contain user ID’s. They will never be null. I will be passing through these IDs as parameters in a stored proc and so I need to set Active = 0 where two user IDs out of UserID1, UserID2 or UserID3 both exist in the same row.
1 Answer