I am trying to write a query on SQL Server to merge data items in 1 record
Input table:
sales_ref_no Description
001 Hello
001 Hi
002 Dear
002 All
002 Please
003 Thanks
Output table:
sales_ref_no Description
001 Hello | Hi
002 Dear | All | Please
003 Thanks
The description under the same sales_ref_no is accumulated under the same record using a | delimiter
Can anyone help?
Thanks!