cast是转换的意思,as int即转换为int类型,ISNULL(qy_tosr,‘0’)这个函数是计算qy_tosr为空,记为0;
am.areaName,a.rm_no,b.hou_name,cu.CUST_NAME,ct_name,SUM(cast(ISNULL(qy_tosr,‘0’)as int))qy_tosr,SUM(cast(ISNULL
(qy_jlr,‘0’)as int))qy_jlr,SUM(cast(ISNULL(qy_ckch,‘0’)as int))qy_ckch,SUM(cast(ISNULL(qy_sjss,‘0’)as int))
qy_sjss,SUM(cast(ISNULL(qy_kytr,‘0’)as int))qy_kytr,SUM(cast(ISNULL(qy_toass,‘0’)as int))
qy_toass,tota_pers,fm_zl,sy_new,rj_zhuz,legal_person,lp_tel,cust_leaddre,cust_djpername,cust_djzw,cust_djtel