plsql show query
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 req开发者_运维技巧uested 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
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
and 260
(as displayed in the stacktrace of the error).
To output your parameters dbms_output
should work. Test the following script:
Set Serveroutput On
Begin
dbms_output.put_line('Test');
End;
/
精彩评论