如何在Oracle SQL Developer中运行存储过程? [英] How to run a stored procedure in oracle sql developer?
本文介绍了如何在Oracle SQL Developer中运行存储过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试运行此存储过程
I'm trying to run this stored procedure
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:
任何人都知道错在哪里吗? 谢谢.
Any one knows what is wrong ? Thanks.
推荐答案
尝试执行这样的过程,
var c refcursor;
execute pkg_name.get_user('14232', '15', 'TDWL', 'SA', 1, :c);
print c;
这篇关于如何在Oracle SQL Developer中运行存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文