• Hugo, is it not documented or documented as not defined? This code reminded me of a function I use that operates on the same principle in order to concatenate column data over multiple rows for a certain UserID:

    SET @ComplaintList = ''

    SELECT @ComplaintList = @ComplaintList+ UserComplaint+ char(13)

    FROM ComplaintsTable

    WHERE UserID=@UserID

    ..

    Return @ComplaintList

    And it does iterate over all the relevant rows and gives the expected result.

    Where can I find more about this?