KANEDA 0149
asked on
TSQL Multiple Rows Into 1 Row
Hello, need help to return multiple rows into 1 singular column with semicolon delimiter. I tried the FOR XML PATH but got stuck because my original query requires a nested join. Below is an example of the current results and my expected results. Thanks in advance!
select a.WorkflowID, b.ResourceName
from table1 a
left join (select distinct ResourceID, ResourceName
from table2
where ResourceType = 4) b on a.ConstructID = b.ResourceID
where a.ConstructType = 4
MS SQL? You can use STUFF. Have a look at https://www.emoreau.com/Entries/Blogs/2009/10/SQL-Concatenate-values-multiple-from-multiple-lines.aspx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you ste5an, that worked!
ASKER
Thank you, that did it!