Troubleshooting
Problem
The above error is observed after a new DB2 instance and new database are created (empty or sample database). After connecting to the database either of the SQL commands below are then issued to observe the side-effect of a decimal division result (both commands perform and provide the same action and output result): db2 "VALUES (DEC(1,31,0)/DEC(1,31,5))" or db2 "select DEC(1,31,0)/DEC(1,31,5) from sysibm.sysdummy1" The error received is "SQL0419N A decimal divide operation is not valid because the result would have a negative scale. SQLSTATE=42911" (Note: Also see "Related URLs" section in this Technote on How Error code "SQL0344N The recursive common table expression SQLSTATE=42825" can also appear and be related to this)
Symptom
Error "SQL0419N A decimal divide operation is not valid because the result would have a negative scale. SQLSTATE=42911" received on observing the side-effect of a decimal division result.
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
15 June 2026
UID
swg21982596