2009-06-18 00:58:33 / ASP & Access & SQL Server 后台编程讨论版
SELECT U.UI_ID, U.UI_Name, (select count(I_ID) from InteractiveInfo as I where I.I_ReceiveUnits= U.UI_ID) AS refercount, (select count(I_ID) from InteractiveInfo as I where I.I_ReceiveUnits= U.UI_ID and (I_RevertIS0 and I_ShowIs0)) AS revertcount, IIf(revertcount>0,Round((revertcount/refercount)*100,0),0) AS RU_PercentFROM UnitsInfo AS U;上面这条语句在ACESS里面是可行的。但是在SQL2000里面是不行的。原因是这个不支持IIf(revertcount>0,Round((revertcount/refercount)*100,0),0) AS RU_
查看(161)
评论(0)