在MS SQL Server 2012中,出现一个函数,就是IIF,它可以替代一些CASE的表达式。
如以前的一篇文章:http://www.cnblogs.com/insus/articles/1944849.html
如今可以很简单方便解决它: