NParry (7/12/2016)
Just tried these out, and this:/*(9)*/ SELECT DISTINCT(COUNT(1)) FROM #TmpCounts; -- 1 row
Actually returns 6. This is on SQL Server 2008.
6 is the result from the COUNT(1) and then DISTINCT(). Only 1 row is returned with a value 6.
Igor Micev,My blog: www.igormicev.com