Skip to content
Advertisement

SQL Server : Merge output based on ID

I have a SQL Server table containing multiple file names and their versions.

When I run

I get

I’d like the output to be

I believe this can be achieved by using CASE, but haven’t been successful and therefore seek your advise.

Advertisement

Answer

Use conditional aggregation:

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