If you have a column of data and you want to concatinate it into a single variable for use in a stored procedure then the above code offers one way to do it.
This can of course be modified to to handle and combine multiple columns of data into a single (comma delimited ) string.