Can i call a mysql stored function from another mysql stored function or stored procedure, passing a string to the first function which is the name of the second function to call. I.e choosing the the second function via a value in field.
I suspect I can't and I will have to use a case statement, but I have to ask :)
Something like this?
CREATE FUNCTION string_processing_chain
(function_name VARCHAR(1000), data_to_process VARCHAR(1000)) RETURNS VARCHAR(1000) BEGIN
RETURN ($function_name)(to_process); END
Aucun commentaire:
Enregistrer un commentaire