本文介绍了双内连接在访问db的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从两个表中获取一些数据,1个人,2个任务,
以下SQL查询在工作,Access不工作

I need to get some data from two tables, 1 people, 2 tasks,The following query in SQL works, and Access does not work

 SELECT     Task_Id,
            e2.emploeey_name AS W_FROM,
            e1.emploeey_name AS W_TO,
            t.Task_Details
 FROM       tasks AS T
 INNER JOIN Employees AS e1 ON e1.Emploeey_id = T.Task_To
 INNER JOIN Employees AS e2 ON e2.Emploeey_id = T.write_From

我试过很多方法,我在谷歌搜索,我没有找到答案
如果任何人有一个解决方案,我会很感激它

I tried many ways, and I searched in Google and I did not find an answerIf anyone has a solution I would appreciate it very

推荐答案

你试过括号吗? MS Access需要(即喜欢)多个JOINS周围的括号:

Have you tried it with parentheses? MS Access requires (i.e. likes) parentheses around multiple JOINS:

 SELECT     Task_Id,
            e2.emploeey_name AS W_FROM,
            e1.emploeey_name AS W_TO,
            t.Task_Details
 FROM       
 (
      tasks AS T
      INNER JOIN Employees AS e1 
           ON e1.Emploeey_id = T.Task_To
 )
 INNER JOIN Employees AS e2 
      ON e2.Emploeey_id = T.write_From

这篇关于双内连接在访问db的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 08:05