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.PUT_LINE

RE: DBMS_OUTPUT.PUT_LINE

From: Diana Duncan <dduncan_at_arsenaldigital.com>
Date: Tue, 20 Mar 2001 08:38:39 -0800
Message-ID: <F001.002D1C2C.20010320081058@fatcity.com>

Roland,

The only trick with dbms_output.put_line is to set your serveroutput on. The following is a sample script to be run in SQL*Plus. Warning: it's a stupid script, you'd never want to do this in real life. :)

set serverout on
declare

        cursor some_cursor is
                select *
                from some_table;
begin
        for curRec in some_cursor loop
                insert into another_table (col1, col2)
                values (curRec.col1, curRec.col2);
                dbms_output.put_line('Inserted ' || SQL%rowcount || '
rows.');
        end loop;

end;
/

Diana

-----Original Message-----
Sent: Tuesday, March 20, 2001 8:51 AM
To: Multiple recipients of list ORACLE-L

Hello,

Anyone who has a suggestion how to write the DBMS_OUTPUT.PUT_LINE command if I want to display the numbers of inserts done in that script? Would appreciate it very much if anyone could help..

Roland Sköldblom

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: Roland.Skoldblom_at_ica.se

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Diana Duncan INET: dduncan_at_arsenaldigital.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- 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 Tue Mar 20 2001 - 10:38:39 CST

Original text of this message

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