You might open an incident with Teradata support, the possible range of values the result should fit into DEC(38,2), at least it worked when i just tried it.
If there were only decimals i would assume a MAXDECIMAL set to less than 38 in dbscontrol, but the resulting datatye of a POWER is NUMBER. Do you get the same error when you change POWER to b.col2**2 (which results in float)?
Are any rows returned when you add a WHERE a25 <> cast(cast(a25 as varchar(100)) as dec(38,2)))?
Dieter
You might open an incident with Teradata support, the possible range of values the result should fit into DEC(38,2), at least it worked when i just tried it.
If there were only decimals i would assume a MAXDECIMAL set to less than 38 in dbscontrol, but the resulting datatye of a POWER is NUMBER. Do you get the same error when you change POWER to b.col2**2 (which results in float)?
Are any rows returned when you add a WHERE a25 <> cast(cast(a25 as varchar(100)) as dec(38,2)))?
Dieter