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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: DBMS_OUTPUT

Re: DBMS_OUTPUT

From: Ghassan Salem <salem.ghassan_at_gmail.com>
Date: Wed, 3 Jan 2007 11:45:15 +0100
Message-ID: <411d50f60701030245g367bc33ah3ff726059aaa4119@mail.gmail.com>


No, not odd at all, sql*plus tests for dbms_output after a pl/sql call, not after ordinary sql,
try something like
begin null; end;

after your submit your sql

rgds

On 1/3/07, David Moss <David.Moss_at_fdmgroup.com> wrote:
>
>
> Hi,
>
> Just a quick question, hope someone can illuminate me... I'm trying to
> debug a function using dbms_output but I can't gt anything I ask it to print
> displayed (not immediately anyway)... sample session:
>
> SQL> set serveroutput on;
> SQL> show serveroutput;
> serveroutput ON size 2000 format WORD_WRAPPED
> SQL> create or replace function test return number is begin
> DBMS_OUTPUT.put_line('Hello, world!'); return 0; end;
> 2 /
>
> Function created.
>
> SQL> select test() from dual;
>
> TEST()
> ----------
> 0
>
> SQL>
>
> Am i missing something really obvious or is this some sort of bug? I also
> realized that if then i do:
>
> SQL> create or replace procedure test2 is begin
> DBMS_OUTPUT.put_line('Hello again!'); end;
> 2 /
>
> Procedure created.
>
> SQL> select test() from dual;
>
> TEST()
> ----------
> 0
>
> SQL> call test2();
> Hello, world!
> Hello, world!
> Hello again!
>
> Call completed.
>
> SQL>
>
> odd... anyone?
>
> Thanks,
>
> David.
>
> This message is confidential and is intended for the addressee only;
> unless clearly stated that this disclaimer should not apply, this e-mail is
> not intended to create legally binding commitments on behalf of FDM Group
> Plc, nor do its contents reflect the corporate views or policies of FDM. Any
> unauthorised disclosure, use or dissemination, either whole or partial, is
> prohibited. If you are not the intended recipient of the message, please
> notify the sender immediately.
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________
>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jan 03 2007 - 04:45:15 CST

Original text of this message

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