有多種錯誤在功能。
sys-ryfcursor
這是SYS_REFCURSOR
。
DECLARE
您不需要DECLARE
關鍵字。去掉它。
的建議,總是編譯你的代碼,並使用SHOW錯誤在的SQL * Plus或類似的客戶端看到完整的錯誤堆棧。如果您發佈它的完整版
例如,
SQL> CREATE OR REPLACE
2 FUNCTION F5(
3 tstg IN stage.numerostage%type)
4 RETURN SYS-ryfcursor
5 DECLARE
6 BEGIN
7 OPEN list FOR SELECT COUNT(*)
8 AS
9 nbrmodule,sess.* FROM session sess NATURAL JOIN enseigne WHERE numerostage=tstg;
10 RETURN list;
11 END;
12 /
Warning: Function created with compilation errors.
SQL> sho err
Errors for FUNCTION F5:
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/15 PLS-00103: Encountered the symbol "-" when expecting one of the
following:
. @ % ; is authid as cluster order using external character
deterministic parallel_enable pipelined aggregate
result_cache accessible
SQL>
你的錯誤信息可能會得到改善。 – TZHX
而db是?選一個。 –
@ user_0你是什麼意思? –