Logical Functions – IIF()

I am going continuing my short articles or tidbits on Transaction SQL logical functions. These functions were introduced with the SQL Server 2012 release. Both functions have their origins from Visual Basic for Applications (VBA) framework. I think of these function as decision trees. Especially when they are nested to several levels. If you have a kid like I do, you might find the decision tree for dropped food funny. Please see image to left. I will be exploring the IIF function today. The example below uses the RAND function,…

Logical Functions – CHOOSE()

I am going write a couple of tidbits on Transaction SQL logical functions. These functions were introduced with the SQL Server 2012 release. Both functions have their origins from Visual Basic for Applications (VBA) framework. I think of these function as decision trees. Especially when they are nested to several levels. If you have a kid like I do, you might find the decision tree for dropped food funny. Please see image to left. I will be exploring the CHOOSE function today. If you grew up like I did, you…