Can I create in T-SQL a stored procedure that loops through rows and concatenates data into a variable, as I do in Visual Basic (VB)?
There are two basic ways to solve problems in T-SQL: row-by-row processing or set-based logic. Row-by-row processing is similar to what you might do in a procedural language such as VB. Usually, you implement row-by-row processing in T-SQL by using a T-SQLbased cursor. You can use a cursor to loop through a data set, concatenating data to a...