I have the following XML in a XML column in SQL Server.
<qualifiers>
<qualifier>
<key>111</key>
<message>a match was not found</message>
</qualifier>
<qualifier>
<key>222</key>
<message>a match was found</message>
</qualifier>
<qualifier>
<key>333</key>
<message>error</message>
</qualifier>
</qualifiers>
How can I write TSQL to return all the values in qualifiers/qualifier/message in a comma delimited string? My goal is to have the query return the values from the XML in a single column for each row.
The results should look like this:
"a match was not found, a match was found, error"