Below is sample of code that is summing tran_amt based on the value in month_dt. The month_dt is a varchar(2).
How can I sum the the tran_amt?
The error msg is :
failed 3535 A character string failed conversion to a numeric value
sum(case when b.month_dt in ('01','02','03','04','05','06','07','08
','09','10','11','12') and a.record_rank > 2 then
end) as cat_other_tot_lt22
from PROTO_PSD1.wrk_yes_act_mnth b
left outer join PROTO_PSD1.wrk_yes_stage_17 a
on a.prod_acct_no = b.prod_acct_no
and a.month_dt = b.month_dt
group by a.prod_acct_no
Solved! Go to Solution.