Skip to content
Advertisement

MySQL GROUP_CONCAT with COLUMN SPLIT

I am working with a TABLE, need logical help.

Check the below URL for the table structure and sample data.

http://sqlfiddle.com/#!2/ece06/2

Table Schema:

JavaScript

Inserted Data:

JavaScript

Query:

JavaScript

OutPUT:

JavaScript

Expected OUTPUT:

JavaScript

As you can see the output of the query has concat with comma. And currently we are doing string concat using PHP which splits while displaying!!

Is there any other way to split the RESULT and show each value in column and same ROW? In same result?

Note: The CODE might vary for each ROW.

Advertisement

Answer

With Help from my colleague We arrived at a point to solve this senario. Hope some one might needed it.. It is welcome if some one make it much simpler.

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