Oracle创建函数失败
有人可以告诉我为什么下面的函数编译失败吗?
CREATE or replace FUNCTION CONCAT_LIST
(cur IN SYS_REFCURSOR, sep IN VARCHAR2)
RETURN VARCHAR2
IS
ret VARCHAR2(32000);
tmp VARCHAR2(4000);
BEGIN
--open cur;
loop
fetch cur into tmp;
exit when cur%NOTFOUND;
if ret is null then
ret := tmp;
else
ret := ret || sep || tmp;
end if;
end loop;
RETURN ret;
END;
我收到的错误消息是
PLS-00103: Encountered the symbol " " when expecting one of the following:
<an identifier> <a double-quoted delimited-identifier> SELF_
LONG_ double ref char time timestamp interval date binary
national character nchar
can somebody tell me why the below function should fail compilation?
CREATE or replace FUNCTION CONCAT_LIST
(cur IN SYS_REFCURSOR, sep IN VARCHAR2)
RETURN VARCHAR2
IS
ret VARCHAR2(32000);
tmp VARCHAR2(4000);
BEGIN
--open cur;
loop
fetch cur into tmp;
exit when cur%NOTFOUND;
if ret is null then
ret := tmp;
else
ret := ret || sep || tmp;
end if;
end loop;
RETURN ret;
END;
The error message I get is
PLS-00103: Encountered the symbol " " when expecting one of the following:
<an identifier> <a double-quoted delimited-identifier> SELF_
LONG_ double ref char time timestamp interval date binary
national character nchar
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论