Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: DBMS_OUTPUT.PUT_LINE
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;
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 Liststo: 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).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: 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).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: 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).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: 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 - 12:09:10 CST
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
![]() |
![]() |