how many rows processed [message #170277] |
Wed, 03 May 2006 01:44 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
raom
Messages: 22 Registered: January 2006 Location: india
|
Junior Member |
|
|
hi
could any body please tell me how to get the number of rows processed in PL/SQL procedure
example
for the below query
SQL> update account_p set ri=power(2,28)*1+rownum;
22 rows updated.
we get a promt for number of rows updated.(22 rows updated)
if i do it from a PL/SQL scripts how can i know that how many
rows were processed.
please advise.
[Updated on: Wed, 03 May 2006 01:44] Report message to a moderator
|
|
|
Re: how many rows processed [message #170288 is a reply to message #170277] |
Wed, 03 May 2006 03:09 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
orausern
Messages: 826 Registered: December 2005
|
Senior Member |
|
|
afaik, you need to add your own code to know that..e.g. if there is a cursor , then use a variable and take the sql query used in the cursor to store the count of that query in the variable..
e.g. if the cursor is
cursor c is select * from emp;
then,
have a variable v and ,
select count(*) into v from emp;
this way you need to add your own code...
|
|
|
Re: how many rows processed [message #170426 is a reply to message #170288] |
Wed, 03 May 2006 14:45 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
SQL> create table t (col1 varchar2(10));
Table created.
SQL> set serveroutput on
SQL> BEGIN
2 INSERT INTO t (SELECT 'test' FROM user_tables);
3 DBMS_OUTPUT.put_line ('Rows inserted=' || TO_CHAR (SQL%ROWCOUNT));
4 END;
5 /
Rows inserted=198
PL/SQL procedure successfully completed.
SQL>
[Updated on: Wed, 03 May 2006 14:47] Report message to a moderator
|
|
|
|
Re: how many rows processed [message #177335 is a reply to message #170277] |
Wed, 14 June 2006 04:09 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
gnuda
Messages: 5 Registered: June 2006
|
Junior Member |
|
|
Hi
I want to do the same thing but in Warehouse Builder.
I have a mapping that has a splitter. Correct rows will be inserted to one table and rows that are not correct will be insertet to another.
So I want to count how many rows that are correct and how man that arn't.
I have created a log procedure that should log theese values. How can I get these values in a Warehouse Builder mapping?
|
|
|