errorcode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

errorcode [2016/03/31 15:08] (current)
dmtolpeko created
Line 1: Line 1:
 +====== ERRORCODE ======
  
 +ERRORCODE built-in variable contains the return code of the last SQL statement. The code can be zero (0), negative or positive:
 +
 +| **ERRORCODE** | **Result** |
 +| 0 | Successful execution |
 +| Positive values | Warning ​ |
 +| Negative values | Error |
 +
 +
 +<code language=sql>​
 +.if errorcode <> 0 then .quit 1
 +</​code>​
 +
 +**Compatibility:​** Teradata BTEQ.
 +
 +**Version:​** HPL/SQL 0.3.31
 +
 +**See also:**
 +  * [[error-handling|Error Handling]]
 +  * [[sqlcode|SQLCODE]]
 +  * [[sqlstate|SQLSTATE]]
 +  * [[get-diagnostics|GET DIAGNOSTICS]]
 +  * [[resignal|RESIGNAL]]