日期:2014-05-18 浏览次数:20587 次
SELECT v_qyfhqd.Fhqdh , v_qyfhqd.hwbh , v_qyfhqd.Clbh , v_qyfhqd.Jydbh , v_qyfhqd.Fhsl , v_qyfhqd.Fhzl , v_qyfhqd.Fhtj , v_qyfhqd.Fszbm , v_qyfhqd.Other , v_qyfhqd.lwfy , v_qyfhqd.Sxhh , v_qyfhqd.Hwmc , v_qyfhqd.Hwlx , v_qyfhqd.Fhzt , v_qyfhqd.dzzbm , v_qyfhqd.qdjh , v_qyfhqd.Fhrxm , v_qyfhqd.Fhrdh , v_qyfhqd.Shrxm , v_qyfhqd.Shrdh , v_qyfhqd.zyfs , v_qyfhqd.Thfs , v_qyfhqd.Sdzbm , v_qyfhqd.cyf , v_qyfhqd.Zbxf , v_qyfhqd.Jjfy , v_qyfhqd.Zdzf , v_qyfhqd.Dshk , v_qyfhqd.Hdfk , v_qyfhqd.Yjyfhj , v_qyfhqd.Sqke , v_qyfhqd.Hkze , v_qyfhqd.Kcsj , v_qyfhqd.fhy , v_qyfhqd.zcy , v_qyfhqd.gsjbr , v_qyfhqd.Other_b , v_qyfhqd.jsyxm , v_qyfhqd.Sfzh , v_qyfhqd.Scdh , v_qyfhqd.Zdzbm , v_qyfhqd.tyfz , v_qyfhqd.other_c , v_qyfhqd.Sfjj , v_qyfhqd.Zyf, sum(zyf) as zyff, v_qyfhqd.fkfs , v_qyfhqd.clyf , v_qyfhqd.Fgsbm FROM v_qyfhqd WHERE ( v_qyfhqd.Fhqdh ='101201201280001' ) group by Fhqdh,hwbh,clbh,jydbh,fhsl,fhzl,fhtj,fszbm,other,lwfy,sxhh,hwmc,hwlx,fhzt,dzzbm,qdjh,fhrxm, fhrdh,shrxm,shrdh,zyfs,thfs,sdzbm,cyf,zbxf,jjfy,zdzf,dshk,hdfk,yjyfhj,sqke,hkze,kcsj,fhy,zcy, gsjbr,other_b,jsyxm,sfzh,scdh,zdzbm,tyfz,other_c,sfjj,clyf,fgsbm,fkfs,zyf
--在你的结果上嵌套一下 select sum(zyff) from (你的语句) aa where colname='到付'