The information in the MSDN link is hard to grasp in my opinion (it is a long way from reading "must be implicitly convertible" to understanding that the conversion may result in loss of data), but the example provided makes it very clear.

douglascfast (9/9/2008)Did I miss something? If two columns are 1 in lengh, and the others are 9 "some text" and 14 "Some more text", then would not the count(*) give you 2 (1 length) 1(9 lenght) and 1(14 lenght).

Let's go step by step.CREATE TABLE #TEST(A varchar,B varchar(30)); ---> Field named A is of size 1 with type Varchar.

ISNULL(A,B) ---> means:evaluate the field A, (the first parameter), if has something other than a NULL then return it to me otherwise return me the value converted to Varchar size 1 (As A is Varchar (1)) from varchar size 30 in field B for current record.So if you run

Now let's talk about COALESCE(A,B)COALESCE returns the first non-null expression among its arguments,If you run SELECT LEN(COALESCE(A,B)),COALESCE(A,B)FROM #TESTthen----------- ------------------------------1 A9 Some text1 B14 Some more textsoSELECT COUNT(*),LEN(COALESCE(A,B))FROM #TESTGROUP BY LEN(COALESCE(A,B));----------- -----------2 11 91 14.I hope this has been useful.