how do i merge multiple rows into one in mssql?

You can use following SQL Select

select
    id,
    MAX(segment) as segment,
    MAX(country) as country,
    MAX(product) as product,
    MAX(status) as status,
    MAX(month) as month,
    MAX(year) as year
from tbl
group by id

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top