报表本年对应的上一年数据为空时,将空转换为0

update session.results set tq_qty= case when tq_qty=0 or tq_qty is null then 0 else tq_qty end,
                                   tq_zb= case when tq_zb=0 or tq_zb is null then 0 else tq_zb end,
                                   zbadd= case when zbadd=0 or tq_zb is null then 0 else zbadd end;

猜你喜欢

转载自blog.csdn.net/m0_37392721/article/details/82458962