title: Types don't match between the anchor and the recursive part in column of recursive query
body: <p>Given a category <strong>@categoryId</strong>, the query should recursively navigate to the top most super-category, which has been accomplished.</p>
  
  <p>Now I'd like also to generate all along a string which would be the <strong>concatenation of all the CategoryName</strong> in the process. </p>
  
  <pre><code>DECLARE @CategoryId AS int = 217;
  WITH Categories AS
  (
     SELECT ParentCategoryId, CategoryName, '' AS strCategory
     FROM Category 
     WHERE CategoryId = @CategoryId
  
     UNION ALL
  
     SELECT c.ParentCategoryId, c.CategoryName,
         (c.CategoryName + ': ' + cts.strCategory) AS strCategory  
     FROM Category AS c
     JOIN Categories AS cts
     ON c.CategoryId = cts.ParentCategoryId
  )
  
  SELECT TOP 1 CategoryName, LEN(CategoryName) AS strLength
  FROM Categories
  ORDER BY strLength DESC
  </code></pre>
  
  <p>With the above code I'm getting the following error:</p>
  
  <pre><code>Types don't match between the anchor and the recursive part in column 
  "strCategory" of recursive query "Categories".
  </code></pre>
  
  <p>Thanks for helping</p>