How can I implement SQL INTERSECT and MINUS operations in MS Access

I have researched and haven't found a way to run INTERSECT and MINUS operations in MS Access. Does any way exist

Answers


INTERSECT is an inner join. MINUS is an outer join, where you choose only the records that don't exist in the other table.


INTERSECT

select distinct
  a.*
from
  a
  inner join b on a.id = b.id


MINUS

select distinct
  a.*
from
  a
  left outer join b on a.id = b.id
where
  b.id is null

If you edit your original question and post some sample data then an example can be given.

EDIT: Forgot to add in the distinct to the queries.


Need Your Help

Heroku + Cloudflare completely free SSL

node.js ssl heroku express cloudflare

Attempting to get completely free SSL on Heroku using Cloudflares new free Universal SSL

cocoa: suggestion about designing a cocoa application

osx cocoa

I'm implementing a mac os program, but I have no idea about how to design a good application, such as how to design user interaction. If any book is about design a mac app or good design applications

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.