Quite regularly DB2 complains about my SQL statements and usually returns a cryptic error message including an even more cryptic SQL error code. What I normally do in those situations is looking up the error code in the DB2 Information Center, which takes some time. I just found out that there is an easier way to get at least a short explanation of what an error code means. For example, to look up the error code -161, you can use the following SQL query:
VALUES SQLERRM(-161)
Result:
1
------------------------------------------------------------------------------------------------------
SQL0161N The resulting row of the insert or update operation does not conform to the view definition.
Nice.
I prefer this from the command line: db2 ? sql-161
alternatively: db2 ? sql161N