您的位置:首页 > 数据库

sqlplus中执行存储过程

2010-04-21 14:29 337 查看
CREATE OR REPLACE PROCEDURE GETZRCLIST
(p_TYBM in varchar2,p_CURSOR OUT comm_types.comm_cursor) is
temp_str varchar2(10);
temp_nf number;
temp_number number;

begin
temp_str := p_TYBM;
-- temp_nf := p_NF;
temp_number := to_number(temp_str);

--CDC

open p_CURSOR for
SELECT * from T_ZRCXX where (TYBM_ID = temp_str) order by zlcbm;

end GETZRCLIST; -- TYBM_ID 是varchar2类型的。
SQL> var p_cur refcursor;
SQL>
SQL> exec sp_pp(1,1,1,1,0,:p_cur);

PL/SQL procedure successfully completed.

SQL> print p_cur;
ERROR:
ORA-01652: unable to extend temp segment by 128 in tablespace TEMP

no rows selected

SQL> alter session set sql_trace=false;

Session altered.

SQL>

//////////////////////////////////////////

SQL> var out_no number
SQL> exec SP_SERVICE('133', :out_no);

print out_no

http://www.itpub.net/thread-256539-1-1.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: