我想创建一个包,在包内我们有一个带有参数的函数。我有 TIME_DIM 表,该表的粒度是一条记录/秒。我在装箱时遇到错误,任何人都可以帮助我解决这个问题。
create or replace
PACKAGE PKG_TIME_DIM
IS
Function FUN_TIME_DESC
( TIME_IN IN varchar2 )
RETURN varchar2
IS
TIMEDESC varchar2;
CURSOR c1
IS
SELECT TIME_DESC
from TIME_DIM
where TIME_DESC = TIME_IN;
BEGIN
open c1;
fetch c1 into TIME_DESC;
if c1%notfound then
TIMEDESC := 9999;
end if;
close c1;
RETURN TIMEDESC;
END;
END;