Hello,
I was facing the same issue.
I was using Microsoft SQL Server, which does not handle such transformations. A solution could be to use staging tables whith one columns mapped to the "STUFF" function, and a subquery using Xml instruction.
It would look like this:
STUFF(
select concat(' - ',temp_table.typecomposition_fr, ': ', temp_table.composition)
from stage_plm as temp_table
where
temp_table.idsap = stage_plm.idsap
and temp_table.codesaison = stage_plm.codesaison
ORDER BY temp_table.ElementRank ASC
FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)')
,1,3,'')
Unfortunately, I was retrieving the data from another staging table, with automatic table and column names, so it could not make the job.
The support team gived me another solution: use the internal Stambia H2 database.
It contains a function "group_concat" matching my needs.
It gives my this kind of mapping:
group_concat(
concat( ElementTraduction_fr.LibelleCourt, ': ', Composant.composition)
order by ReferentielElement.Ordre
separator ' - '
)