微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在oracle sql开发人员中运行存储过程?

我试图运行这个存储过程
DECLARE
  P_TICKER_SERIAL VARCHAR2(200);
  P_SECTOR_CODE   VARCHAR2(200);
  P_SOURCE_ID     VARCHAR2(200);
  P_COUNTRY_CODE  VARCHAR2(200);
  P_FILTER_TYPE   NUMBER;
  CUR_OUT         SYS_REFCURSOR;
  dbUserTable     DBUSER%rOWTYPE;
BEGIN
  P_TICKER_SERIAL :='14232';
  P_SECTOR_CODE   := '15';
  P_SOURCE_ID     := 'TDWL';
  P_COUNTRY_CODE  := 'SA';
  P_FILTER_TYPE   := 1;

  PKG_name.GET_user(
    P_TICKER_SERIAL => P_TICKER_SERIAL,P_SECTOR_CODE   => P_SECTOR_CODE,P_SOURCE_ID     => P_SOURCE_ID,P_COUNTRY_CODE  => P_COUNTRY_CODE,P_FILTER_TYPE   => P_FILTER_TYPE,CUR_OUT         => CUR_OUT
  );
  open CUR_OUT;
  LOOP
    FETCH CUR_OUT INTO dbUserTable;
    dbms_output.put_line(dbUserTable.email);
  END LOOP;
  CLOSE CUR_OUT;
END;
 /

但它给我这个错误

Error report:
ORA-06550: line 8,column 15:
PLS-00201: identifier 'DBUSER' must be declared
ORA-06550: line 8,column 15:
PL/sql: Item ignored
ORA-06550: line 24,column 2:
PLS-00382: expression is of wrong type
ORA-06550: line 24,column 2:
PL/sql: sql Statement ignored
ORA-06550: line 26,column 24:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 26,column 5:
PL/sql: sql Statement ignored
ORA-06550: line 27,column 28:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 27,column 7:
PL/sql: Statement ignored
06550. 00000 -  "line %s,column %s:\n%s"
*Cause:    Usually a PL/sql compilation error.
*Action:

有谁知道有什么问题?
谢谢。

尝试执行这样的过程,
var c refcursor;
execute pkg_name.get_user('14232','15','TDWL','SA',1,:c);
print c;

原文地址:https://www.jb51.cc/oracle/205997.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐