In an XSL webpage, I'd like to select data for sending an email to multiple addresses taken from an SQL query.
The XSL code would be something like this:
where "@emails" would be taken from an SQL query (querying a table column). I was thinking about creating a string: address + semicolon + space + address + semicolon + space... and so on until it runs out of email addresses.
How to do that?
You can do concatenation as:
select stuff((select '; ' + eMailColumn
from TableName
where SomeColumn = @conditionValue
and eMailColumn is not NULL
for xml path('')), 1, 2, '')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.