Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: DBMS_OUTPUT.PUT_LINE
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;
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-LReceived on Tue Mar 20 2001 - 11:45:07 CST
(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). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jeffery Stevenson INET: jeff_at_mpv.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).
![]() |
![]() |