Can anyone decode the next nested IIF in a CASE statement in SQL. I know that IIF is allowed in SQL Server 2012, but it's hard for me to get an easy understanding of IIF nested logic. The following is my nested IIF expression
IIF(IIF(TABLE_A.Col_1 = 0, TABLE_A.Col_2 + (2*TABLE_A.Col_3), TABLE_A.Col_1)<=.5, 'A', 'B') AS Result
Any help is greatly appreciated.
source share