我需要一些建议,如何在select子查询或创建视图中使用内联函数。我的代码给了我以下错误。
我使用了这个link,建议的最后一个解决方案正是我也想要做的。
代码:
select /*+ WITH_PLSQL */ calc from
(
with
function calculator (m number, r number) return number
is begin
return m * r;
end calculator;
select calculator(3, 2) as calc from dual
);
错误:
ORA-06553: PLS-103: Encountered the symbol "end-of-file" when expecting one of the following:
. ( * @ % & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between || member submultiset
06553. 00000 - "PLS-%s: %s"
*Cause:
*Action:
Error at Line: 4 Column: 1
提前致谢
答案 0 :(得分:0)
我在AskTOM上发布了这个问题,您可以在以下链接中看到整个讨论主题:Solution for above issue
问题在于SQL开发人员,在SQLPlus中,这个查询工作正常。