[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

In Access, how to create a query to exclude some data from a table

I need create a query to exclude the data from a table based on ID, year and month.

Table 1:  ID, year, month, data1, data2....
Table 2:  ID, year, month

A query will get all data in Table 1 except those in Table 2

Thanks.
0
jjxia2001
Asked:
jjxia2001
1 Solution
 
tigin44Commented:
SELECT T1.ID, T1.year, T1.month, T1.data1, T1.data2....
FROM table1 T1
      LEFT OUTER JOIN table2 T2 ON T1.ID = T2.ID AND T1.year = T2.year AND T1.month = T2.month
WHERE T2.ID IS NULL
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now