I'm trying to update a column in SQL Server 2016 using CASE statement because I have to change the value based on different conditions. The problem is that I have more than 10 conditions and it seems that SQL Server allows for only 10 levels of condition at most. So how can I do this? Here is what I was trying to do:
UPDATE my_table SET my_column = CASE WHEN condition1 THEN expression1 WHEN condition2 THEN expression2 ...
It is not a linked server and I haven't tried to put 11 conditions in a
CASE expression. If you look at the documentation, you will find "SQL Server allows for only 10 levels of nesting in