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: Stephane Faroult <sfaroult_at_oriolecorp.com>
Date: Fri, 16 May 2003 08:32:20 -0800
Message-ID: <F001.0059AC66.20030516083220@fatcity.com>

>----- ------- Original Message ------- -----
>From: "Adams, Matthew (GECP, MABG, 088130)"
><MATT.ADAMS_at_APPL.GE.COM>
>To: Multiple recipients of list ORACLE-L
><ORACLE-L_at_fatcity.com>
>Sent: Fri, 16 May 2003 07:16:42
>
>------_=_NextPart_001_01C31BB5.F94D0230
>Content-Type: text/plain;
> charset="iso-8859-1"
>
>If I have put 'dbms_output.enable(10000)'
>and dbms_output.put_line('hello world')
>in a function (contained in a package)
>and run 'set serveroutput on' in sqlplus,
>and then call the function in a select statement,
>what reasons might there be for not getting the
>output
>to my screen?
>
>The statement does not return any error?
>
>The manual for built in packages (8.1.6) gives
>no indications as to why this might not work from a
>
>package.
>
>----
>Matt Adams - GE Appliances - matt.adams_at_appl.ge.com
>

Matthew,

  I think that it depends on how you are using it. Two thoughts. Basically,

     set serveroutput on
says to SQL*Plus :

   once the statement is finished, check whether there is something in the buffer and display it. No hope to see anything displayed during the fetch, or to check the output of your function in the WHERE clause - unless, that is, YOU call the suitable dbms_output function to retrieve the data from the buffer - what SQL*Plus does transparently for you when serveroutput is switched on.

The second thought is the possibility that dbms_output.enable() resets everything. If it were true, though, you should nevertheless see the last 'Hello world', so I am not 100% abou this. But since your function is packaged, I would call dbms_output.enable in the initialisation function of the package, to be sure.

HTH, Stephane Faroult
Oriole

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriolecorp.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri May 16 2003 - 11:32:20 CDT

Original text of this message

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