I am having trouble with returning multiple values in a sub query and adding them to a string. Currently I am using:
Select master_key, (select parent_key
from cmpower.dbo.dlnk
where dlnk.parent_key = sbrv_table.masterkey)
from cmpower.dbo.sbrv_table
The sub query returns multiple rows which I need to put into a comma delimited string.
I am not sure how to add the sub query results to a string to be returned with the main select query.
Any guidance would be much appreciated.