Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    18

    Unanswered: get warning message when data not found

    in the begin atomic ...end statement,
    how to make the db2 to update/delete statement to get warning message when data is not found ,then rollback.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Code:
    DECLARE UNDO HANDLER FOR NOT FOUND...

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Check out the GET DIAGNOSTICS statement in SQL Reference Vol 2 manual. ROW_COUNT Identifies the number of rows associated with the previous SQL statement. If the previous SQL statement is a DELETE, INSERT, or UPDATE statement, ROW_COUNT identifies the number of rows that qualified for the operation.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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