IIf(IsEmpty(Measures.CurrentMember), "Yes", "No")
在Access中我可以用IIF函数进行统计汇总,比如,要知道实际应该交费的用户个数:
Select sum(iif(金额>0, 1,0)) as num from 费用
在SQL Server中好像没有对应的函数,我用:
select sum(case when 金额>0 then 1 else 0 end ) as num from 费用
SQL 里的if 和access里的iif
最新推荐文章于 2021-02-22 21:40:33 发布