I have to convert an MSSQL stored proc that passes a varchar that is a query. The proc has the following command:
INSERT INTO Results
EXEC (@Expresion);
This isn't working. I'm pretty sure that EXEC and EXECUTE arent MySQL commands but CALL doesn't work either. Does anyone know if its even possible to have something like JavaScript's eval function for mysql?
Thanks
From the link in bodnarbm's post I got this solution:
SET @s = CONCAT('INSERT INTO Results ', @Expression);
PREPARE stmt FROM @s;
EXECUTE stmt;