plsql 显示查询
我在使用oracle pl sql 时遇到一个小问题。 我有一个带有一些游标等的 sql 文件,处理失败但没有详细信息。 我对这个问题有一个想法(带有参数的函数),但我想查看每个调用的参数,以便能够进行调试,以准确查看参数失败的情况。 这是消息:
DECLARE
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at line 165
ORA-06512: at line 260
是否需要设置一些内容才能看到一些详细信息?
我正在这样开始我的治疗
sqlplus -L $ORA_CONNECT @$FIC_REQ
I have a small problem using oracle pl sql.
I have a sql file with some cursor, etc, and the treatement fail but with no details.
I have an idea about the problem (a function with parameters) but I would like to see the parameter for each call, to be able to debug, to see exactly with wich parameter fail.
This is the message:
DECLARE
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at line 165
ORA-06512: at line 260
Is there something to set to be able to see some details ?
I'm launching my treatement like this
sqlplus -L $ORA_CONNECT @$FIC_REQ
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您尝试
Select Into
变量,但您的选择返回多行时,就会出现此错误。检查脚本中的这些行:
165
和260
(如错误的堆栈跟踪中所示)。要输出您的参数,
dbms_output
应该可以工作。测试以下脚本:This error occurs when you try to
Select Into
a variable, but your select returns more than one row.Check these lines in your script:
165
and260
(as displayed in the stacktrace of the error).To output your parameters
dbms_output
should work. Test the following script: