Search code examples
google-chromeconcatenationsql-likeheidisql

ayuda , how to use concat on heidi sql?


in version 12 of hedisql there is still concat or how to do it ??

CREATE VIEW imagen as SELECT asset_tag.asset_id FROM asset_tag GROUP BY asset_tag.asset_id ;

SELECT concat_ws(',',asset_tag.tag_id) FROM ( SELECT imagen.asset_id FROM imagen WHERE imagen.asset_id = asset_tag.asset_id ) public.asset_tag ;

The objective is that the source table that has two columns, group by column 1 and that a new column indicate separated by commas what column 1 has in column 2 (of origin).

columna 1 - 1 1 2 2 3 3 4 4 columna 2 - a b c a d a f g

and in a new column or table 1 - a b / 2 - b c


Solution

  • I already answered your question in the HeidiSQL forum. And to clarify a misunderstanding: CONCAT() is a function provided by the database server (MySQL), not the client (HeidiSQL). So you can ignore the HeidiSQL version for that issue.