Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2012

    Unanswered: equivalent of db2

    What is the equivalent of sybase @@sqlstatus=1 and @@sqlstatus=2 in db2???
    I am using ibm data studio,db2 version 9.7v and windows 7.

  2. #2
    Join Date
    Apr 2012
    Provided Answers: 27
    Depends on the context...the programming technique and language used...

    For SQL PL, iterating over a cursor, it's common to use a handler for catching NOT FOUND or SQLEXCEPTIONs. See the sample programs supplied by IBM for example code (available in the SQLLIB SAMPLES SQLPL subdirectory).

    For PL SQL, different syntax applies, refer to Oracle docs.

Posting Permissions

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