Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2009
    Posts
    5

    Unanswered: SQLcode and Sql states

    HI,

    When i know a sqlstate value and i want to know the corresponding sqlcode values, do we have any command for that

    Please let me know if any one finds it

    Sandhya

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    No, because multiple SQLCODEs may map to the same SQLSTATE.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    SQLSTATE was an attempt to standardize error codes accross all relational database products (including non-IBM products).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Nov 2009
    Posts
    5
    Thank u, so u mean to say there is no other way to get the sqlcode associated to a certain sqlstate...

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by sandhya.karanam View Post
    Thank u, so u mean to say there is no other way to get the sqlcode associated to a certain sqlstate...
    You can search the PDF manual (SQL Messages Vol 2) for each occurance of a SQLSTATE to see if it comes up more than once.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  6. #6
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Quote Originally Posted by sandhya.karanam View Post
    Thank u, so u mean to say there is no other way to get the sqlcode associated to a certain sqlstate...
    There is no "sqlcode associated to a certain sqlstate" - it is the other way around: each SQLCODE has an associated SQLSTATE. This is a 1:n mapping between SQLCODE and SQLSTATE.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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