遇到了这个符号?

时间:2015-06-05 11:11:46

标签: sql oracle plsql oracle11g oracle10g

List<double[]> y = new ArrayList<double[]>();
y.add(new double[15]);    
y.add(new double[20]);

我收到此错误:

  

遇到符号

1 个答案:

答案 0 :(得分:1)

功能中有多个错误

  

SYS-ryfcursor

这是SYS_REFCURSOR

  

DECLARE

您不需要DECLARE关键字。删除它。

建议,始终编译您的代码,并在 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>