This is a minimal example:
我怀疑有一些问题与光标本身,因为这一切开始时,我得到了ORA-01001无效光标
create or replace
package TABULA.gettorim as
PROCEDURE liorByBranch ( br_out_rec OUT sys_refcursor );
end gettorim;
/
Package created.
CREATE OR REPLACE PACKAGE BODY tabula.gettorim AS
PROCEDURE liorbybranch (
br_out_rec OUT SYS_REFCURSOR
) IS
BEGIN
EXECUTE IMMEDIATE 'alter session set nls_date_format=''dd-mm-yyyy''';
OPEN br_out_rec FOR
SELECT * FROM DUAL;
CLOSE br_out_rec;
END liorbybranch;
END gettorim;
/
Package body created.
SQL>
variable br_out_rec refcursor;
DECLARE
BEGIN
TABULA.gettorim.liorbybranch(:br_out_rec);
END;
/
print br_out_recSQL> 2 3 4 5
PL/SQL procedure successfully completed.
SQL>
ERROR:
ORA-24338: statement handle not executed
SP2-0625: Error printing variable "br_out_rec"
我怀疑有一些问题与光标本身,因为这一切开始时,我得到了ORA-01001无效光标
1条答案
按热度按时间aemubtdh1#
那是因为你关闭了光标;别这样。