Yup.  Like I said, you'd never want to do this in real life.  I was just
illustrating the idea.

-----Original Message-----
Sent: Tuesday, March 20, 2001 12:30 PM
To: Multiple recipients of list ORACLE-L


Won't that continuously print:

Inserted 1 rows.
Inserted 1 rows.
...

(well, as long as you don't get a primary/foreign key exception)  :)

Jeffery Stevenson
Chief Databeast Tamer
Medical Present Value, Inc.
Austin, TX


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


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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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: Jeffery Stevenson
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to