I need to combine the multiple rows into either single row or two rows by comma separator as per the specified length as below:
+-------------------------------------+--------------------------------+
ID Name
+-------------------------------------+--------------------------------+
1 Rohit
1 Virat
1 Dhawan
1 Vijay
2 Mohit
2 Raina
+-------------------------------------+--------------------------------+
Here we are trying to combine multiple rows into single row but it needs to be with condition that if the first rows crosses the length of 12 then insertion of new record as need to be shown as below:
+-------------------------------------+--------------------------------+
ID Name
+-------------------------------------+--------------------------------+
1 Rohit,Virat
1 Dhawan,Vijay
2 Mohit,Raina
+-------------------------------------+--------------------------------+