That is correct, you canot call a stored procedure from a UDF.
There is an alternative. You could do it the brute force way in your UDF.
CREATE FUNCTION GET_VALUE(key INTEGER, field VARCHAR(255) )
F1: BEGIN ATOMIC
DECLARE value VARCHAR(255);
DECLARE var1, var2, var3, ...
select * into var1, var1, var3, ... from mytab where key = key_col;
if field = 'Col1'
THEN value = var1;
if field = 'Col2'
THEN value = var2;
if field = 'Col3'
THEN value = var3;
Originally posted by cvigouroux
Ok, let's suppose I can do it with the prepare statement in a stored proc. I have another problem : how can I call my stored proc from the function ? It seems also impossible... ?