IBM Support

Error SQL0419N A decimal divide operation is not valid because the result would have a negative scale. SQLSTATE=42911

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.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Database Objects\/Config - Instance","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.1;10.5;9.5;9.7;9.8","Edition":"Advanced Enterprise Server;Advanced Workgroup Server;Enterprise Server;Express;Express-C;Personal;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
15 June 2026

UID

swg21982596