Access substitute for EXCEPT clause

前端 未结 4 1188
有刺的猬
有刺的猬 2020-12-07 01:36

How can I get the same result I would get with the SQL code below in ms access? It does not recognize the EXCEPT clause...

SELECT DISTINCT 
             


        
4条回答
  •  误落风尘
    2020-12-07 01:55

    Not an explicit example here, but consider UNION-ing the two fetched tables and selecting, from that union, pairs that have fewer than 2 instances of a certain field combination. This implies that, where each table has more than one instance of a record with the same values on the field combination, these records are the same and can be eliminated from result set. Where not, they are unique to one table, leaving fetch with only records from the selected table where there is no match to the other table. Kind of like a poor-man's "EXCEPT" KW.

提交回复
热议问题