SQL return codes: Difference between revisions

wikademia>JohnsonCharlesD
wikademia>JohnsonCharlesD
Line 15: Line 15:
   Positive means successful execution with a warning.  
   Positive means successful execution with a warning.  
   An example is +100 which means no rows found.
   An example is +100 which means no rows found.
  If you have an SQL code with a letter in it look at Letter Codes below.


Here is a more comprehensive list of the SQLCODEs for DB2:
Here is a more comprehensive list of the SQLCODEs for DB2:
Line 90: Line 94:
   +304  Value cannot be assigned to this host variable because it is out of range.
   +304  Value cannot be assigned to this host variable because it is out of range.
   +802  The null indicator was set to -2 as an arithmetic statement didn't work.
   +802  The null indicator was set to -2 as an arithmetic statement didn't work.
=== Letter SQL Codes ===
  If you have a code in the type of SQL-0000##A these are still valid but hard to decipher.
  Use the chart below to map the letter to the last number of the value. 
  This was created when SQL Codes where only able to be unsigned.
  Example  SQL-000010N  => This translates to SQL CODE: -105.
  Example  SQL-000092P  => This translates to SQL CODE: -927.
 
*  0  1  2  3  4  5  6  7  8  9
*  }  A  B  C  D  E  F  G  H  I
*  =====================================
*    -1  -2  -3  -4  -5  -6  -7  -8  -9
*      J  K  L  M  N  O  P  Q  R


==External links==
==External links==