创建 Oracle 游标
我创建一个像这样的游标:
SQL> CREATE OR REPLACE PROCEDURE Update_STUD_FinAid ( AIDY_CODE IN VARCHAR2 ) IS
2 CURSOR PublicationC IS
3 SELECT SGBSTDN_USER_ID from SGBSTDN
4 WHERE SGBSTDN_TERM_CODE_EFF ='201030';
5 BEGIN
6 close PublicationC;
7
8 OPEN PublicationC;
9
10 FOR PublicationR IN PublicationC
11 LOOP
12 DBMS_OUTPUT.PUT_LINE( PublicationR.SGBSTDN_USER_ID );
13 END LOOP;
14
15 close PublicationC;
16
17 END;
18 /
过程已创建。
然后,当我运行该程序时,我收到此错误:
ERROR at line 1:
ORA-06512: at line 2
请告知。
谢谢
I create a cursor like this:
SQL> CREATE OR REPLACE PROCEDURE Update_STUD_FinAid ( AIDY_CODE IN VARCHAR2 ) IS
2 CURSOR PublicationC IS
3 SELECT SGBSTDN_USER_ID from SGBSTDN
4 WHERE SGBSTDN_TERM_CODE_EFF ='201030';
5 BEGIN
6 close PublicationC;
7
8 OPEN PublicationC;
9
10 FOR PublicationR IN PublicationC
11 LOOP
12 DBMS_OUTPUT.PUT_LINE( PublicationR.SGBSTDN_USER_ID );
13 END LOOP;
14
15 close PublicationC;
16
17 END;
18 /
Procedure created.
And then when I run the Procedure then I get this error:
ERROR at line 1:
ORA-06512: at line 2
Please advise.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论