Mannu k

Mannu k

  • NA
  • 5
  • 4.6k

Convert group_concat of MYSQL to SQL query

Feb 24 2016 7:00 AM
Hi I have a query in MYSQL which is using group_concat. I want to convert it into Sql server query.
Could you please help me.
Thanks in advance. below is the query.
 
 
select apj.package_id,
group_concat(DISTINCT concat(asset.asset_id, '-', asset.name) SEPARATOR '||')'asset_names'
from stg.asset_package_join apj (NOLOCK) , stg.asset asset (NOLOCK) where asset.id = apj.asset_id
group by apj.package_id