Sunday, July 15, 2012

How do you check SQL error codes easily in DB2?

You can run the following query :

VALUES SQLERRM(<Error Code>)

For Example, if the error code is "-171" then the query should be :

VALUES SQLERRM(-171)

which shows SQL0171N and its equivalent error description - "THE DATA TYPE, LENGTH, OR VALUE OF ARGUMENT  IS INVALID".

No comments :