delimiter //
CREATE TRIGGER trig AFTER INSERT ON table0 FOR EACH ROW
BEGIN
CREATE TEMPORARY TABLE temp (SELECT t1.col1,t1.Col2,t2.col3,t3.col4,t4.col5 FROM (table1 AS t1 JOIN table2 AS t2 ON t1.col1 = t2.col3... etc) WHERE t1.condition = NEW.condition);
INSERT INTO table5 VALUES (NULL,CURRENT_TIMESTAMP(),0,0,NULL,NULL,NULL,NEW.condition, SELECT GROUP_CONCAT("\"",someColumn - 1,",",50,",",someColumn2,",",30,",",someColumn3,"\"" SEPARATOR ';') FROM temp);
DROP temp;
END;//
delimiter ;
The error is now
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT CONCAT("\"",someColumn - 1,",",50,",",someColumn2,",",30,",",someColu' at line 4
It gets cut off at the someColu of someColumn3
Thank you for your time.
tableZin this case).