Did any body face above error in SQL Server 2005 when using += string concatenation operator.
According to SQL Server 2005 books online, it should work, even the example shown in MSDN does not compile in SQL Server Management Studio 2005.
In SQL server 2008 it works fine.
I think its bug in SQL Server 2005.
The workaround is achieve the concatenation using + operator.
The use of the c-like short assigment operators like
+=,-=etc. is only valid from SQL Server 2008 onward. You can’t use it with SQL Server 2005.