• Really appreciate you looking in/at this issue.

    The fact that you can reproduce the error by adding the COLLATE-clause is "as designed" in SQL Server.

    Forget the SQL 2008 track for now.

    The code is working in a SQL 2008 environment.

    The code also works in a SQL 2012 environment only when the database wherein you work has CONTAINMENT TYPE NONE

    Did you have a try with the code against a database with CONTAINMENT TYPE PARTIAL ?

    I also installed Service Pack I for SQL 2012, but the error still occurs

    "Walking on water and developing software from a specification are easy if both are frozen." -- Edward V. Berard, "Life-Cycle Approaches"