嵌套查询-ADO+DELPHI+SQL SERVER
CDMAA 2003-03-18 05:54:17 只是一个简单的嵌套查询,为什么在ACCESS下数据库行,在SQL SERVER下不行?为什么,谁能给点提示!
select * from Table1 where ATime>=:t1 and BTime<=:t2
这个查询是成功的
接下的来就不对了
select count(*),sum(MYMONEY) from(select * from Table1 where ATime>=:t1 and BTime<=:t2
) where TypeOP=:t100
报错!Incorrect syntax near the keyword where
但是用ACCESS中就可以的,为什么,不知道那位兄弟是否也有同样的经历!