Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: debugging an Oracle function??

Re: debugging an Oracle function??

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 12 Feb 2003 20:06:56 -0800
Message-ID: <92eeeff0.0302122006.2620ae8e@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US