0

I am doing an Inner-Join between two tables to try to create a Group_Concat from the first Table:

SELECT GROUP_CONCAT(concat('!"',LJ.Name1,'"') separator ' ') FROM `Table1` BC Inner Join `Table2` LJ On LJ.Name like concat(BC.Name,' %') and LJ.Field_S=BC.Field_S Where LJ.Type='Person' Group by BC.Field_S,BC.Name` 

The problem is when I try to make this an Updateas is the purpose MySql does not like the Group By apparently inside an Update.

SqlFiddle seems to be down so I can't make an example until I can find an alternative but in the interim was wondering if there is some "standard" way of converting this kind of Select Inner Join into an Update Inner Join.

2
  • Until you can be more complete via SQLFiddle, please nevertheless show the update you are trying to do. Give your table definitions. Give the error message. Read re minimal reproducible examples and act on it. Commented Feb 5, 2017 at 7:43
  • @philipxy Thanks, I was hoping SqlFiddle would be up to simplify the explanation. In reading similar questions (stackoverflow.com/questions/3022405/…) I notice there is a way to do this with a subquery which itself is difficult. My fast solution was to do a Create Table as using the Select and then doing a simply Inner Join using the new table. Commented Feb 5, 2017 at 14:24

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.