access:
sum(case when a is not null then area else 0 end)
-->sum(iif(a is not null,area,0)good luck哈,哈哈,哈哈哈......

解决方案 »

  1.   

    还有一个问题,convert函数也用不得,
    该如何,因为我要求百分数,要转换为numeric
    多谢了!
    thank you
      

  2.   

    好像不行啊!
      ss = "select name as 镇区,count(*) as 上报总项数,sum(Area) as 上报总面积,count(YSData4) as 签发项数, sum(iif(a is not null,area,0) as 签发面积 "
      
    s1 = "from vwmprojectmain where ptype=" & type11 & " group by name"
      ss = ss & s1
      Set rst1 = DSDX.GetSQLRS(ss)
    还是提示错误,操作符丢失!
      

  3.   

    少了括号ss = "select name as 镇区,count(*) as 上报总项数,sum(Area) as 上报总面积,count(YSData4) as 签发项数, sum(iif(a is not null,area,0)) as 签发面积 "
      
    s1 = "from vwmprojectmain where ptype=" & type11 & " group by name"
      ss = ss & s1
      Set rst1 = DSDX.GetSQLRS(ss)
    哈,哈哈,哈哈哈......