I am using MySql Server 2014 version. While using group_concat function, I am getting 'group_concat' is not a recognized built-in function name. error message. It would be very help[ful if you can help in this. Thanks in advance!
Hello!
Maybe this solution will help you.
Here is a sample of data in a table:
This is one example of what we want the end result to look like:
SyntaxEditor Code Snippet
SELECT {Person}.[Name], STUFF(( SELECT ', ' + {FavoriteMovies}.[Title] FROM {FavoriteMovies} WHERE {Person}.[Id] = {FavoriteMovies}.[PersonId] FOR XML PATH('') ), 1, 1, '') FROM {Person} GROUP BY {Person}.[Name], {Person}.[Id]
Hope it helps!
Tânia Pires
Hi!
Have you tried the function "CONCAT(), this function adds two or more expressions together?
Or simply the operator "+" between the expressions ?
Regards
Graça
Maria da Graça Peixoto wrote:
It does not reproduce the same effect that Group_Concat. Concat make a concatenation between 2 strings, but group_concat make a concatenation of values inserted in a group.
I have https://stackoverflow.com/questions/3492539/mysql-multiple-row-as-comma-separated-single-row this type of scenario. How can I execute the command like this?