日期:2014-05-16  浏览次数:21198 次

以下sql语句在sqlserver可以运行,在access却不行。
这个在access不能运行
SQL code

select classname,departmentclass.classid,(select count(articleid)  from article where editor in (select username from admin where departmentclassid in (select a.classid from  departmentclass as a where a.parentid =departmentclass.classid or a.classid = departmentclass.classid ))) bb from departmentclass where departmentclass.parentid =0 order by bb desc



这个可以
SQL code


select classname,departmentclass.classid,(select count(articleid)  from article where editor in (select username from admin where departmentclassid in (select a.classid from  departmentclass as a where a.parentid =departmentclass.classid or a.classid = departmentclass.classid )))  from departmentclass where departmentclass.parentid =0 



我想利用那个结果集去排序,要怎么引用?

------解决方案--------------------
select classname,departmentclass.classid,(
select count(articleid)
from article where editor in (
select username from admin 
where departmentclassid in (
select a.classid 
from departmentclass as a where a.parentid =departmentclass.classid or a.classid = departmentclass.classid ))) bb 
from departmentclass where departmentclass.parentid =0 order by 4 desc
------解决方案--------------------
提示什么