Using WHERE NOT EXISTS in MS Access SQL Query

后端 未结 2 1521
予麋鹿
予麋鹿 2021-01-24 08:52

I have a query that matches a field from a query to another field from a table. Here is the query:

SELECT DISTINCT CarriersToSend.Carrier, [Dual Year Carrier Re         


        
2条回答
  •  不思量自难忘°
    2021-01-24 09:16

    Your NOT EXISTS with subquery didn't connect with the main query, so that will didn't return any result.

    You can try this.

    SELECT DISTINCT EE_First, EE_LAST
    FROM [Dual Year Carrier Report] t1
    WHERE NOT EXISTS 
    (
        SELECT 1
        FROM CarriersToSend t2
        WHERE t1.TPA_CARRIER = t2.Carrier
    )
    

提交回复
热议问题