Merge Rows that have same value in SQL Server

Last Reply 23 days ago By pandeyism

Posted 23 days ago

I have a table in SQL that have a CourseId field. an I want to merge the rows that have the same value.

http://uupload.ir/files/zagt_225.png

Regarding the above picture, I want to show that rows that I highlighted them in one row.

the exact output that I want is :

http://uupload.ir/files/2mk3_226.png

how can I do this in SQL?

You are viewing reply posted by: pandeyism 23 days ago.
Posted 23 days ago

Hey dorsa,

It's not possible.

You need to do it from code behind.

Refer below article for merging.

Merge GridView Cells or Columns in a Row in ASP.Net using C# VB.Net