Hello, I have the following function in Mysql:
CREATE FUNCTION `GetTermekAktualisKeszlet`(termek_azon INTEGER(11), raktar_azon INTEGER(11), hosszban_tarolt_termek CHAR) RETURNS float(5,2) NOT DETERMINISTIC SQL SECURITY DEFINER COMMENT '' Begin Declare Akt_keszlet float(5,2) ; SELECT IFNULL( (Select tr_aktualis_keszlet From `termek_raktarhely` Where tr_termek_azon=termek_azon and tr_raktarhely_azon=raktar_azon) ,0) into Akt_keszlet; If Akt_keszlet Is Null THEN set Akt_keszlet = 0; END If; Return Akt_keszlet ; End; The function above returns either 0 or a value on every MySql database, including mine. However at a new customer this returns NOTHING. (not even NULL). How can I correct this problem? Even if I put the line set Akt_keszlet =5 before Return doesn't help getting a number (in this case returns with nothing, too). Thank you very much for your help. -- Zsolt Csillag