This field Resid_Mat is rounding to to 2 decimal places, thus having an effect on the Num_payment field calculation as per attached sql. Does anyone know how I can remedy this? Any help will be much appreciated.
An example of Resid_Mat by running the sql gives me 2.32 instead of 2.31895961670089.
--------------
SELECT CASE REP_INT WHEN '3' THEN '4' WHEN '6' THEN '2' WHEN '7' THEN '52' WHEN '12' THEN '1' WHEN '14' THEN '26' ELSE '12' END AS Div ,(COALESCE(cnt_mat_dte,pricing_dte) - Per_dte)/365.25 AS Res_Mat ,CASE WHEN Res_Mat <= 0 THEN 1 ELSE CAST( (COALESCE(cnt_mat_dte,pricing_dte) - Per_dte)/365.25 * Div AS INT) END AS Payments FROM t_mor_data
Forums: