IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SQLCODE - 419


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nvsnaidu

New User


Joined: 09 Nov 2007
Posts: 7
Location: Chennai

PostPosted: Thu Dec 02, 2010 6:55 pm
Reply with quote

Field A Decimal (15,2)
Field B Decimal (15,3)


SELECT
A / B

FROM C
WHERE ACCT_NUM = '001000020000'


I wanted to divide these two fields and i get the above SQLCODE -419 as below:


DSNT408I SQLCODE = -419, ERROR: A DECIMAL DIVIDE OPERATION IS INVALID BECAUSE THE RESULT WOULD HAVE A NEGATIVE SCALE

I tried using CAST but was not getting the values after decimal points in the ouput. please help
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Dec 02, 2010 8:33 pm
Reply with quote

well, I imagine you problem lies with not understanding the importance of scale.

but, what was your attempt at casting that did not work?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts SQLCODE = -122 while using the scalar... DB2 4
No new posts SQLCODE = -16002 when using XMLEXISTS DB2 1
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
No new posts SQLCODE=-204 SQLSTATE=42704 DB2 4
No new posts Getting sqlcode 805 while executing R... DB2 10
Search our Forums:

Back to Top