Results 1 to 4 of 4

Thread: No Dml

  1. #1
    Join Date
    Oct 2006
    Posts
    15

    Unanswered: No Dml

    UDB 8.2 FP9 , OS WIN


    Is there a way to track the no.of updates, insert ,deletes againest a
    table?

    thanks

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    http://www.dbforums.com/showthread.php?t=1609277

    Follow the above thread

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    if u just want to get count of rows affected u can use :
    GET DIAGNOSTICS Statement

    The GET DIAGNOSTICS statement returns information about the most recently run SQL
    statement. One can either get the number of rows processed (i.e. inserted, updated, or deleted),
    or the return status (for an external procedure call).

    In the example below, some number of rows are updated in the STAFF table. Then the count
    of rows updated is obtained, and used to update a row in the STAFF table:

    BEGIN ATOMIC
    DECLARE numrows INT DEFAULT 0;
    UPDATE staff
    SET salary = 12345
    WHERE ID < 100;
    GET DIAGNOSTICS numrows = ROW_COUNT;
    UPDATE staff
    SET salary = numrows
    WHERE ID = 10;
    END

  4. #4
    Join Date
    Oct 2006
    Posts
    15
    thanks Rahul.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •