I am currently facing an issue in concatenating "NEW" Keyword with column names using concat function..
SET @values =
(SELECT GROUP_CONCAT(CONCAT_WS('.','new', table1.col) SEPARATOR ',')
FROM tbale1, table2, table3, table4
WHERE table3.table3_id = '001'
AND table3.id = table4.table3_id
AND table4.col = table2.col
AND table1.id = table2.table1_id
ORDER BY table2.col);
ON execution, instead of replacing the values for NEW keyword(last inserted records/values) it just returns as NEW.col1,NEW.col2,NEW.col3 instead of their assigned values.please help me out with this..
desired output is SELECT @var ='aa','bb','cc','ccc'; But current output is SELECT @var = NEW.col1,NEW.col2,NEW.col3,NEW.col4;