Re: HELP: Output from within Stored Procedure

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 1996/06/01
Message-ID: <31b0745e.3494354_at_dcsun4>#1/1


On 1 Jun 1996 15:49:39 GMT, bcopping_at_cpcug.org wrote:

>In <4motps$59r_at_newsbf02.news.aol.com>, ahoff54565_at_aol.com (AHoff54565) writes:
>>Hello,
>>
>>There is a system package called DBMS_OUTPUT.PUT_LINE which outputs data
>>from within a PL/SQL routine. You need to SET SERVEROUTPUT ON in your
>>SQL*PLUS session in order for this to work.
>>
>>Example:
>>
>>BEGIN
>>
>>DBMS_OUTPUT.PUT_LINE('hello world'); <---output to screen
>>
>>END;
>>
>>This package can display text and variables. Also, in SQL*PLUS routines
>>you can spool output using the spool <file name> command before the select
>>statement. Good Luck.
>
>Is it possible to include the session command (serveroutput on) in the PL/SQL
>routine so the user doesn't have to issue it each time?
>Thanks,
>Bruce Copping

No in pl/sql. set serveroutput on is a SQL*Plus command, not pl/sql or sql.

You can put the set serveroutput on in your glogin.sql or login.sql files. These files are used by sql*plus to set defaults upon login. Received on Sat Jun 01 1996 - 00:00:00 CEST

Original text of this message