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?
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