Skip to content
Advertisement

Join two tables and concatenate multiple rows of a single field

Query:

Current Output:

Desired Output:

I would like to join two tables, #Table1 and #Tabl2, on a key column, ID, and get Value field from the 2nd table… but in a single row (as shown in desired output).

How (if possible) can I achieve the Desired Output?

Thank you

Advertisement

Answer

For SQL Server 2017 and Later Versions

Result Set

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement