How many records updated

How can I find out how many records have been updated by an update statement and how many remain to be updated, while the statement is still in progress?

For updated ( inserted or deleted ) rows :*SQL%ROWCOUNT*
DECLARE
         v_rows_processed integer := 0;
        BEGIN
            UPDATE sample
               SET testno = 1;
             WHERE test   = 'PL/SQL';
            v_rows_processed := SQL%ROWCOUNT;
            dbms_output.enable;
            dbms_output.put_line('There were '||v_rows_processed||' rows updated');
            IF v_rows_processed := 0
            THEN
                /* Insert Statement */
            END IF;
         END sample;.Edited by: Salim Chelabi on 2009-01-09 09:25

Similar Messages

  • Find out how many records are updated.

    Hello,
    I am executing a Update Statement in a loop from a JSP page this is working good.
    Suppose if there are 10 records and I update 4 records, it gets updated fine.
    What I now need is to find out how many records have been updated. How can I know this?
    Thanks

    statement.executeUpdate() returns the number of records updated.
    Sai Pullabhotla

  • How do we track how many records INSERT/UPDATE/DELETE per day

    Hi All,
    We have around 150 tables in database. so many members/persons can access these table and every one can have rights to do INSERT,DELETE,UPDATE the records. I wanted to know How many records are UPDATED,INSERTED,DELETED for a day. is it possible to find out.
    I have some questions please clarify the doubts.
    1> If we create any table, this table gets store in All_OBJECTS/USER_OBJECTS, tabs/tab/user_tables...... we can find out table name,columns what tables were created in database.
    2> if we enter records/ delete records / update records in a table. we can able to find corresponding table. Apart from corresponding table . is there any way to find out records.
    above i said that if i create any table it will store in objects table.

    Schedule a periodic DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO and query USER_TAB_MODIFICATIONS. This view shows DML activity against each table and is updated when database monitoring info is flushed. The flush is automatic but if you need control over the frequency of updates, you can explicitly call the FLUSH.
    In 9i you have to "ALTER TABLE table_name MONITORING ;" before you can use this method.
    In 10g, this is enabled by default unless STATISTICS_LEVEL is set to BASIC.
    See http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4465.htm#sthref2375
    and
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#ADMIN01508
    Another useful view is V$SEGMENT_STATISTICS (or the faster view V$SEGSTAT) which provides information in the same manner as in the V$SYSTAT / V$SESSTAT views.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • How   many will update in BDC.

    In bdc flat file having  10 records.but 5th record having error.in call transaction how many records will update.
    can any body explain on MODE wise means if put the mode A how many records will update.mode E ,mode N. and explainn fore ground and baground.

    Hello ,
    Mode
    A Display all
    E  Display errors only
    N  No display
    If u set the mode as 'A'.
    U will see all the screens when the processing is being done.
    If u set the mode as 'E'
    U will see the screen only if the screen has errors or else the processing will take place internally.
    If u set the mode as 'N'
    U will not see any screen irrespective of error or success.
    These modes are regarding the processing for foreground.
    Now coming to ur example :-
    If u set the the update process as  one of the below :
    update> : Update mode:
    S Synchronous
    A Asynchronous
    L Local update
    Let's see :-
    If u set as S
    the update will happen if it's error free
    If u set as A iirespective of the errors all the records will get updated
    If u set as 'L'
    This is with respect to number of Application servres.
    Regards,
    Deepu.K

  • How many records does JDBC adapter can obtain in one polling?

    Hello everybody,
    I need to do an interface between legacy system and SAP ECC, the legacy systems have a DB so i use the jdbc adapter (sender) and receive the information to SAP ECC with proxy, so i need to activate the polling option from my jdbc adapter working as a sender, i read a table with lot of records, and i need to know how many records does jdbc adapter support when the polling is executed, because is necessary read all records from the table and change the status of the processed field.
    Is possible to get all the records from that table in one polling interval (50,000 records aprox)?, or i need to do the polling by blocks of records until finish all records from the table?, the second option, i dont have idea how can i do it.
    Regards,
    Vicman

    Hi again!,
    i still working on that, but i have a question, is possible to handle Store Procedure in jdbc adapter?? is supported?, like PL SQL, because i was working in the next query but i don't know if it works and where do i need to locate the query in the Query SQL Statement or in Update SQL Statement field or both? but how?.
    DECLARE c_cursor CURSOR FOR
    SELECT * FROM tablename
    WHERE processed=0
    OPEN c_cursor
       FETCH NEXT FROM c_cursor
    WHILE @@FETCH_STATUS = 0
    BEGIN
       update tablename set processed=1
       FETCH NEXT FROM c_cursor
    END
    CLOSE c_cursor
    DEALLOCATE c_cursor
    Regards,

  • How many reocrds update in call transaction method and session method

    The flat file having the 10 records but the flat file having the 5 th record is error so in session method how many records will  update and in call transaction how many records  will update.
    can you provide with detailed information  like in synchrnous mode and asynchronous mode
    Regards
    reddy

    hi,
    session method :up to 4 records will be updated as it is in synchronus mode.
    Call transaction method : except 5 th all 9 records will be updated as it is assyncronous method.
    Regards
    sandeep Reddy

  • How can I set limitations on how many records a report can return

    I have a report on the web using Oracle Reports builder and I have the client enter in date parameters for the report that they want.
    Well with date ranges for different clients a different number of records are returned. Because of time it can take the report to return I want to limit the number of records that report can return.
    How can I go about doing that? I don't want to limit with date parameters because date won't really work for me. I need to limit on how many records can be returned. If it exceeds 10,000 records I want the client to refine the date range of schedule the report to run later. Meaning we will run that report. So I would have two check boxes if the count was over 10,000 do you want to define your date or schedule the job to run later.
    Can any one help me with this? How would I go about this?

    To know if the report is going to return more than 10,000 records, you first have to run the query with a 'select count(1) from ... where ...' (with the same from and where clauses as you normal query). Since this takes about the same time as runnng your report, I wonder if you really gain anything (although formatting may take some time too).
    You may simplify the select count(1) query by omitting all the lookup tables that are only needed for formatting. That way your query may run a lot faster. You can put this in your after parameter form trigger.

  • Is there any limit on how many records a cursor can hold?

    Hi Everyone,
    This is Amit here. I want to know whether there is any limit on how many records a cursor can hold.
    I have a program in which i am creating a cursor and passing it to another procedure as an input parameter. But the count of cursor query is more than 15 Lakhs. The program is running forever.
    Just wanted to know whether the huge data is the problem.
    Thanks ....
    Regards,
    Amit

    user13079404 wrote:
    Just wanted to know whether the huge data is the problem.What do you think? How long does your code typically need to wait for the data to leave the magnetic platter of the harddisk, travel across wires and into the memory buffer of your application - for a single row?
    Now multiply that waiting for I/O time with a million - for a million rows. Or by a billion, for a billion rows.
    Is "+huge data+" a problem? Not really - it simple needs more work to get that amount of data from disk. More work means slower performance. It is that simple.
    Which is why the row-by-row approach used by many developers is wrong. You do not pull a million rows from disk and process it in PL/SQL or Java or .Net. Heck, you do not even pull 10,000 rows like that.
    The correct approach is to think data sets and use SQL to process that for you - and only return the bare minimum of data to the application layer. Maximize SQL. Minimize PL/SQL and Java and .Net.

  • No of records in SAP BI Corresponds to how many records in database

    Dear all
                   If i have 2lakh records in a datasource  then how it  Corresponds to how many records in database.

    For the first time load the datasource , the no of records in the database(source) must be equal to the number of records in the PSA(datasource).
    If you are daily deleting the records in the PSA , and doing a delta load then the no of records in PSA must be equal to the no of records in delta queue RSA7 for the corresponding datasource .
    If the load is a full load everytime or a full repair  ,then the no of  records in PSA  must be equal to the numbers of records in source.

  • How to keep track of how many records to display in a page.

    Hi All:
    I am using Weblogic 9.2, Web Services Client, and Struts.
    I have a java client in struts that calls a web services.
    The "ID" field contains a Java integer.
    The "First_Name" is a Java String.
    The "Effective_Date" field is a Java date field.
    The web service returns an arrayList of a class called Result.
    Code for Result.java:
    >
    public class Result
    int id;
    String first_Name;
    Date effective_Date;
    public int getId
    return id;
    public void setId(int id)
    this.id=id;
    public String getFirst_Name()
    return first_Name;
    public void setFirst_Name(String first_Name)
    this.first_Name = first_Name;
    public Date getEffective_Date()
         return effective_Date;
    public void setEffective_Date(Date effective_Date)
         this.effective_Date=effective_Date;
    From the arrayList, I displayed the result as the following:
    ID FIRST_NAME EFFECTIVE_DATE
    3 John 9/10/2007
    2 Andrew 1/11/2006
    5 Peter 3/4/2006
    The "ID" header is a link.
    The "First Name" header is a link.
    The "EFFECTIVE_Date" is a link.
    If I clicked on the link "ID", the first time, it will sort the rows in ascending
    order like the following:
    ID FIRST_NAME EFFECTIVE_DATE
    2 Andrew 1/11/2006
    3 John 9/10/2007
    5 Peter 3/4/2006
    If I clicked on the link "ID", the second time, it will sort the rows in descending
    order like the following:
    ID FIRST_NAME EFFECTIVE_DATE
    5 Peter 3/4/2006
    3 John 9/10/2007
    2 Andrew 1/11/2006
    If I clicked on the "First_Name" field the first time, it will sort the rows in
    desceding order.
    If I clicked on the "First_Name" field the second time, it will sort the rows in
    ascending order.
    This applies the same for the "EFFECTIVE_DATE".
    If the arrayList returns 80 records of class Results.java.
    I needed to displayed only the first 50 records for the first page and 30 records for the second page.
    How do I keep track of that so that when I am in the second page, I know to display only record 51 to 80?
    If I have a arrayList that returns 120 records of class Results.java.
    In the first page, it displayed only 50 records.
    In the second page, it displayed only 50 records.
    In the third page, it displayed only 20 records.
    Assuming I am able to sort the rows by ID, FirstName and Effective_Date by using Results.java implementing the
    Java Comparator class. Is it still possible to keep track of how many records displayed in the first page and how many records should
    be dispalyed in the second page?
    Any hint would be greatly appreciate.
    Yours,
    Frustrated.

    Hi,
    Access the table through SM30. It comes blank as standard. Click "New Entries" and make entries for changes to be tracked. For example, whenever an org. unit changes 002 and 003 relationship, you will make entries like:
    01 O 1001 B002 Activate box checked
    01 O 1001 B003 Activate box checked
    Here, 01 is your active plan version, O is org. unit, 1001 is infotype and B002 and B003 are the subtypes. You can also use * for infotype and subtype which means every change will be logged.
    If you then run the report RHCDOC_DISPLAY through SA38, it will pick up all the changes pertaining to B002 and B003 relationship for org. units (in the above example).
    Similarly, you can set up this table for other object types.
    For more information, follow SPRO>Personnel Management>OM>Basic Settings>Activate change documents and go through the documentation for that node. Also, read up the documentation for the report.
    Hope this helps.
    Donnie

  • At  first record of innerloop , want to know how many records exists

    How can I know the number of records in INTBSEG for each record of int_maintable before running the loop for that where condition of INTBSEG.
    Please see below:
    LOOP AT int_maintable.
      Loop at INTBSEG where bukrs = int_maintable-bukrs
                                     AND  belnr = int_maintable-belnr
                                     AND  gjahr = int_maintable-gjahr.
    ( I want to know at the point of sy-tabix of  INTBSEG = 1
    how many records exits in INTBSEG ...
          for this   where bukrs = int_maintable-bukrs
                                     AND  belnr = int_maintable-belnr
                                     AND  gjahr = int_maintable-gjahr.)
    I want to know how many records exits in INTBSEG , for the first record itself of INTBSEG)
      Endloop.
    ENDLOOP.

    Hi,
    Try this..
    DATA: INTBSEG_TMP LIKE INTBSEG OCCURS 0 WITH HEADER LINE.
    DATA: V_LINES TYPE SYTFILL.
    LOOP AT int_maintable.
    CLEAR: V_LINES.
    INTBSEG_TMP[] = INTBSEG[].
    DELETE INTBSEG_TMP WHERE where bukrs <> int_maintable-bukrs
    AND belnr <> int_maintable-belnr
    AND gjahr <> int_maintable-gjahr.
    DESCRIBE TABLE INTBSEG_TMP.
    V_LINES = SY-TFILL.
    Loop at INTBSEG where bukrs = int_maintable-bukrs
    AND belnr = int_maintable-belnr
    AND gjahr = int_maintable-gjahr.
    <b>* Use the field V_LINES to get the number of rows for that combination..</b>
    Endloop.
    Endloop.
    Thanks,
    Naren

  • How many records does SAP object BAPIE1VARKEY contain

    Hi Folks,
    I have just started learning ABAP.
    And i have following queries in mind.
    how many records does SAP object BAPIE1VARKEY contain?
    regards,
    Nithin

    Going on an interview? Going to try to fool a savvy tech manager?  I hope not...  How about you tell me why the answer is not two?

  • Report execute time nd how many records will be returned before hitting the "run" option?

    Post Author: Prasad15
    CA Forum: WebIntelligence Reporting
    Is there any way to know how long the report executes and how many records will be returned before hitting the "run" option?
    Regards
    Prasad

    To know if the report is going to return more than 10,000 records, you first have to run the query with a 'select count(1) from ... where ...' (with the same from and where clauses as you normal query). Since this takes about the same time as runnng your report, I wonder if you really gain anything (although formatting may take some time too).
    You may simplify the select count(1) query by omitting all the lookup tables that are only needed for formatting. That way your query may run a lot faster. You can put this in your after parameter form trigger.

  • How many records are  fetched my query into my internal tables

    Hi
    I am in the debugger, would like to know, how many records are  fetched my query into my internal tables. How do I  find out ?
    thanks
    siva

    Hi,
    Do the following,
    Step 1:
      Fill your internal table with select query.
    Step 2 : Use DESCRIBE statement with LINE addition to get the no of rows in the internal table.
    for further informations, check
    http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3798358411d1829f0000e829fbfe/content.htm
    Regards,
    Anirban

  • Can any body tell me how many records can a db hold in a minute

    can any body tell me how many records can a db hold in a minute

    user644700 wrote:
    can any body tell me how many records can a db hold in a minuteI would hope not since it will depend on X number of factors where X is a very large number.
    Did you have anything specific in mind (version, hardware, etc...)? I assume you mean load and not hold?

Maybe you are looking for

  • IDVD does not respond now

    Hey New User here Actually I had a G4 desktop and have just upgraded to the MacProBook Core Duo 2. Ok here is the issue- over the weekend I had create these movies in iMovie. The first one was 33 minutes with audio and ken burns effects, still photos

  • Question from student

    So I just started learning Oracle and immedeatly ran into some wird stuff. I've created some tables as per textbook, but when I use the describe command I get a strange result: SQL> SELECT table_name 2 FROM user_tables 3 ; TABLE_NAME ORDER_LINE INVEN

  • ISE admin access, authentication against external radius

    Please don't ask me why, the customer insists and wants to be authenticated on ise (as admin) against an external (microsoft) radius server is it possible while retaining internal admin users database in a sequence Internal>external_radius or interna

  • Conditional build tags get out of sync with source control

    Hi all, I work on a team with two other people and we use RH 7 and Microsoft Visual Source Safe. We've been having a problem with our conditional build tags where one person will add, rename, or delete a tag, and although the author checks the tags b

  • Running External Program From Flash

    Is it possible to open Windows calculator (calc.exe) from Flash much like the JumpOutReturn function in Authorware? My apologies if this seems like a simple routine.