We are trying to run below query after migrating Teradata from 14.01 to 15 and are getting error:
SET RAT_INT_CURRENT = CAST((((((1+AMT_INSTAL/AMT_PRINC_REPAY)**(1/CAST((
LOG(2)) AS DECIMAL(38,15))))-1)**CAST((LOG(1+1/CAST(CTR_INSTA
LOG(2)) AS DECIMAL(38,15)))-1) AS DECIMAL(38,15)) *100
WHERE RAT_INT_CURRENT IS NULL
AND AMT_INSTAL <> 0
AND CTR_INSTAL <> 0
AND AMT_PRINC_REPAY <> 0
AND AMT_INSTAL < AMT_PRINC_REPAY
AND CAST((LOG(1+1/CAST(CTR_INSTAL AS DECIMAL(38,15))) / LOG(2)) AS DECIMAL(38,15)) <> 0
Error: *** Failure 2619 Division by zero in an expression involving MKTRSK_SRC_PRODUCT_SCHD_EMI.CTR_INSTAL.
This query was running fine in Teradata 14. Any clue as if why it is happening in TD15 and what is the potential solution for this?