title: String_agg equivalent function in SQL server
body: <p>I want to rewrite my SQL query with stuff or other option available instead of string_agg function as my SQL server doesn't support it.
  Can anyone please help me with this?</p>
  <pre><code>select String_agg(air.code,',') AS Code,String_agg(air.Id,',') AS AId,res.ResId
  from  Table1 air
  inner join
  Table2 rmap on air.Id=airmap.Id
  inner join Table3 res on rmap.ResId=res.ResId
  group by res.ResId
  </code></pre>
  <p>with output like below <a href="https://i.stack.imgur.com/3xsq3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3xsq3.png" alt="enter image description here" /></a></p>