Skip to content
Advertisement

How to merge rows into one row with separator

I need merge rows into one row for summary of calculation (SQL Server 2014).

My SQL query is:

Result of this query is:

I would like to have this result:

When add new currency (x), the result of new currency must be appended:

Can somebody please help me with this topic?

Many thanks

Advertisement

Answer

Something like this should work with earlier versions of MSSQL as well.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement