Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: debugging an Oracle function??
Frank <fvanbortel_at_netscape.net> wrote in message news:<3E4A94B9.4080801_at_netscape.net>...
>
> select QuestionTypeForQuestionId(1) from dual;
You cannot print dbms_output via select query. It will only print returned value from function but dbms_output.put_line is a procedure, thus, calling function must be enclosed inside begin end; block.
set serverout on
declare
ret_ varchar2(100); -- This is for function return value
val_ number := 1;
begin
ret_ := QuestionTypeForQuestionId(val_);
end;
/
This will print all your dbms_output statements from the function.
Regards
/Rauf Sarwar
Received on Wed Feb 12 2003 - 22:06:56 CST
![]() |
![]() |