If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > SQLcode and Sql states

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-27-09, 00:46
sandhya.karanam sandhya.karanam is offline
Registered User
 
Join Date: Nov 2009
Posts: 5
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
Reply With Quote
  #2 (permalink)  
Old 11-27-09, 09:37
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
No, because multiple SQLCODEs may map to the same SQLSTATE.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 11-27-09, 09:49
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #4 (permalink)  
Old 11-28-09, 06:41
sandhya.karanam sandhya.karanam is offline
Registered User
 
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...
Reply With Quote
  #5 (permalink)  
Old 11-28-09, 11:14
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #6 (permalink)  
Old 11-30-09, 08:42
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On