Home Forums SQL Server 2012 SQL Server 2012 - T-SQL Concatenate multiple rows from one table, associated to column in second table having multiple values RE: Concatenate multiple rows from one table, associated to column in second table having multiple values

  • SSCrazy, you are correct. Without the correction CHARINDEX was finding and returning two code values for for "Literacy"--"IT" and "Literacy".

    Also, I discovered FOR XMLPATH doesn't like strings containing an ampersand. The description "This & That" is returned as "This &[amp]". I've added brackets to amp to make it appear in this post, not sure which IFCode would fix that.

    One row to rule all them codes ... bad, bad, bad.