I thought you would need to do "@subject +=" rather than "@subject = +". In any case, the += operator is supported only in SQL 2008 or later. If that indeed is the objective you should change it. The other alternatives are 1 and 3 in the example code below.