I'm trying to store some data from a temporary query into a table, but it doesn't work.
Suppose we have the following data
And the radio Button/checkbox value table: Table_B
I've written the following code trying to match the options stored in the previous table against the column "Marketing_data" to obtain a new column:
SELECT GROUP_CONCAT(DISTINCT c0.option_name)Marketing_data FROM Table_A d JOIN Table_B c0 ON FIND_IN_SET(c0.option_value, d.Marketing_data) GROUP BY d.Marketing_data;
And the resulting column is composed as follow:
|Football, SUV, Cabrio, Gas|
|Football, Golf, SUV, Hybrid|
Now, what I'm trying to do is to insert the last column into the first table (Table_A). I tried with INSERT INTO command and I've also tried to generate another table containing the Submission_id field, but nothing worked. Have you got any suggestions? Many Thanks to everyone who will try to help me.