日期:2014-05-17  浏览次数:20607 次

sql server inner join and 在access中用什么代替?
SELECT a.id,b.title FROM a left JOIN b ON b.aid=a.id and b.id>10 WHERE a.id=变量
在sql server 中测试通过正常
在access中加上 and b.id>10 连接条件就出错
Microsoft JET Database Engine 错误 '80040e14'
不支持连接表达式。
请问在access中有什么办法吗?

------解决方案--------------------
刚才查了一下语法应该是不行的(参考下面),需要AB两张表的字段都存在。如果是这样的话你可以稍微改一下你的语句,将b表中id>10的数据作为中间表再跟A join. 

SELECT a.id,b1.title FROM a left JOIN (select * from b where id>10)b1 ON b1.aid=a.id WHERE a.id=变量

access EFT JOIN、RIGHT JOIN 操作:http://office.microsoft.com/zh-cn/access-help/HA001231489.aspx?CTT=1