form子句语法错误
在acces新建查询 sql语句如下
SQL code
select *,iif(isnull(reply),0,reply) as replys,iif(isnull(last_time),leave_time,last_time) as lasttime
from leave_word left join
(select leave_word_id,count(*) as reply ,max(restore_time) as last_time
from [restore] group by leave_word_id) a
on leave_word.id=a.leave_word_id
order by [top] desc,lasttime desc
结果创建成功,但是我用asp。net前台使用的时候出错
提示from子句语法错误
回来修改这个代码
很囧的是 随便改个字符 然后改回来
保存的时候就出现form子句错误
显示在group 那里
什么表的结构之类的就不帖了
大概问题出在哪里?
只学过SQL 基本上没用过access。。。
------解决方案--------------------
select *,iif(isnull(reply),0,reply) as replys,iif(isnull(last_time),leave_time,last_time) as lasttime
from leave_word left join
(select leave_word_id,count(*) as reply ,max(restore_time) as last_time
from [restore] group by leave_word_id) a
on leave_word.id=a.leave_word_id
order by [top] desc,iif(isnull(last_time),leave_time,last_time) desc