Ambiguous left joins in MS Access

后端 未结 2 1915
难免孤独
难免孤独 2021-01-20 06:10

I want to convert the following query from T-SQL

SELECT
    * 
FROM
    A                            LEFT JOIN
    B ON A.field1 = B.field1     LEFT JOIN
            


        
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-20 06:42

    You need a derived table to make this work in MS Access:

    SELECT * 
    FROM (
       SELECT A.Field1, A.Field2 As A2, B.Field2 
       FROM A 
       LEFT JOIN B ON A.field1 = B.field1) AS x 
    LEFT JOIN C ON  x.A2 = C.field1 AND  x.field2= C.field2 
    

提交回复
热议问题