My table rows are like below
Id marks
Row1: 1 15
Row2: 1 16
Row3: 1 17
Row4: 2 18
Row5: 2 19
Row6: 2 20
and I want to merge all the rows into a single row , can anybody help me please!!!!
output should be like below
Id marks1 marks2 marks3 Id marks1 marks2 marks3
Row1: 1 15 16 17 2 18 19 20

Raja TPosted Sep 19, 2015, 5:15 AM
http://mobile.databasejournal.com/features/mssql/converting-rows-to-columns-pivot-and-columns-to-rows-unpivot-in-sql-server.html
http://www.codeproject.com/Tips/500811/Simple-Way-To-Use-Pivot-In-SQL-Query
https://technet.microsoft.com/en-us/library/ms177410(v=sql.105).aspx