Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SQLCODE = -419 & SQLSTATE = 42911

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
GOWTHAM PAINENI

New User


Joined: 16 Aug 2011
Posts: 7
Location: USA

PostPosted: Sat Oct 08, 2011 5:04 am    Post subject: SQLCODE = -419 & SQLSTATE = 42911
Reply with quote

Hi,
I'm trying to execute the below mentioned DIVISION in a SELECT statement of my query on a DB2 table. And I'm getting the below error message...
------------------------------------------------------------------------------------
DSNT408I SQLCODE = -419, ERROR: A DECIMAL DIVIDE OPERATION IS INVALID BECAUSE THE RESULT WOULD HAVE A NEGATIVE SCALE
DSNT418I SQLSTATE = 42911 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNXOBFF SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = 910 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION
------------------------------------------------------------------------------
Query that I'm trying to execute is :
-----------------------------------------
SELECT
(ROUND((USEDQTY - BIDQTY),4) /ROUND(USEDQTY,4))
FROM TABLE_NAME
;

In my table I've the following values in the USEDQTY & BIDQTY Columns

USEDQTY BIDQTY
100 3.8811
676.3704 35.2593
751.2927 0
3210.675 4.3856
3095.865 0
714.9398 45.024
450.4679 50.8844
239.8908 32.5102
194.7822 36.7367
196.627 41.5124
240.1033 46.9089

Just to validate, I tried to execute the same query by using certain numeric value (say 50) in the denominator part i.e. in place of ROUND(USEDQTY,4), then it is giving results without any issue.

Can any one help me with some inputs on this issue ?
Back to top
View user's profile Send private message

GOWTHAM PAINENI

New User


Joined: 16 Aug 2011
Posts: 7
Location: USA

PostPosted: Sat Oct 08, 2011 5:18 am    Post subject: Reply to: SQLCODE = -419 & SQLSTATE = 42911
Reply with quote

Here USEDQTY & BIDQTY both are of data type DECIMAL(13,4).
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Sat Oct 08, 2011 8:07 am    Post subject:
Reply with quote

Google swg21214415.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 SQL Error: SQLCODE=-440, SQLSTATE... kishpra DB2 1 Sat Feb 18, 2017 2:31 am
No new posts SQLCODE-000000080N priya91 DB2 1 Mon Feb 01, 2016 4:35 pm
No new posts Need to understand SQLCODE = 12 rohanthengal DB2 3 Thu Nov 05, 2015 11:22 am
No new posts SQLCODE -922 in Batch-Cics program tr... kishpra CICS 2 Thu Sep 10, 2015 12:36 pm
No new posts SQLCODE -450 for stored procedure spoorni DB2 3 Fri Jan 16, 2015 2:45 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us