What is happening in this T-SQL code? (Concatenting the results of a SELECT statement)
- by Ben McCormack
I'm just starting to learn T-SQL and could use some help in understanding what's going on in a particular block of code. I modified some code in an answer I received in a previous question, and here is the code in question:
DECLARE @column_list AS varchar(max)
SELECT @column_list = COALESCE(@column_list, ',') +
'SUM(Case When Sku2=' +…