|
|
|
|
|
by gary__
3703 days ago
|
|
Since SQL Server 2012, you can use the lovely IIF statement, which is translated into a CASE behind the scenes. So: CASE WHEN SUM(express_delivered) = 0 THEN 0 ELSE 1 END AS ever_been_express_delivered becomes: IIF(SUM(express_delivered) = 0, 0, 1) AS ever_been_express_delivered https://msdn.microsoft.com/en-GB/library/hh213574.aspx |
|