Consider a database table holding names, with three rows: Peter Paul Mary Is there an easy way to turn this into a single string of Peter, Paul, Mary?
Using MySQL, I can do something like: SELECT hobbies FROM peoples_hobbies WHERE person_id = 5; and get: shopping fishing coding but instead I just want 1 row, 1 col: shopping, fishing, coding ...
I have a table and I'd like to pull one row per id with field values concatenated. In my table, for example, I have this: TM67 | 4 | 32556 TM67 | 9 | 98200 TM67 | 72 | 22300 TM99 | 2 | 23009 TM99...
I'm using GROUP_CONCAT() in a MySQL query to convert multiple rows into a single string. However, the maximum length of the result of this function is 1024 characters. I'm very well aware that I can ...
If I have a table with the following data in MySQL: id Name Value 1 A 4 1 A 5 1 B 8 2 C 9 how do I get it into th...
I am doing SELECT GROUP_CONCAT(categories SEPARATOR ' ') FROM table. Sample data below: categories ---------- test1 test2 test3 test4 test1 test3 test1 test3 However, I am getting test1 test2 test3...
I need something similar to these 2 SO questions, but using Informix SQL syntax. Concatenate several fields into one with SQL SQL Help: Select statement Concatenate a One to Many relationship My...
I'm looking for the LINQ equivalent to the Sybase's LIST() or MySQL's group_concat() It'll convert: User Hobby -------------- Bob Football Bob Golf Bob Tennis Sue Sleeping Sue Drinkin...
In short: Is there any way to sort the values in a GROUP_CONCAT statement? Query: GROUP_CONCAT((SELECT GROUP_CONCAT(parent.name SEPARATOR " » ") FROM test_competence AS node, test_compete...
I have table with player-s in many-to-many relation with skill-s The goal is to list the players and their "top 3 skills" with a single query. fiddle create table player( id int primary key ); c...