Archives of the TeradataForum
Message Posted: Mon, 06 Jan 2003 @ 15:17:31 GMT
<-- Anonymously Posted: Monday, January 06, 2003 09:58 -->
The reason you are getting overflow errors is that your result data type is not probably what you expect.
If you multiply two dec(15,2) columns, the result is a dec(15,4). The resulting data type operates within tighter bounds than dec(15,2). You can see what the result will be by using the TYPE (COLUMN_A * COLUMN_B) function.
Also, sum can also cause the result to be a different datatype
You may need to consider casting the columns as floats and possibly recasting the result back to a suitable form for your application.
There is an example below which may work. However, you may need to tweak it.
(sum(cast(l_ijkl as float) * (1 - cast(l_mnop as float))
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|