我正在尝试创建一个存储函数来获取一个称为预算的参数。该函数应返回字符串“LOW”表示预算小于或等于 500000,“MID”表示预算小于或等于 850000,“HIGH”表示预算小于或等于 1200000,“ULTRA”表示预算超过 1200000。但我遇到了一个对我来说没有多大意义的错误。
这是我的功能:
set term # ;
create procedure f_rating(budget int)
as
begin
if (budget <= 500000) then
return ('LOW');
else if (budget <= 850000) then
return ('MID');
else if (budget <= 1200000) then
return ('HIGH');
else
return ('ULTRA');
end #
我对 sql 还是很陌生,所以这个语法是基于网上的例子等等。这是我的错误:
SQL Message : -804
An error was found in the application program input parameters for the SQL statement.
Engine Code : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -804
Function unknown
RETURN
谁能帮我弄清楚这意味着什么?