Hello:
I have two input tables, for example:
Table 1 has 100 Records with a key field with values from A1 To A100
Table 2 has 10 Records with a key fields with values from A30 to A39
I have not found a way in query builder (In one query) to delete those 10 matching records in Table 1 using the values in Table 2, leaving 90 records in Table 1.
It seems like it should be so simple!
Thanks,
Rich Locus
Delete Records using Query Builder
-
- Administrator
- Posts: 78524
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Delete Records using Query Builder
Like this:
DELETE [Table 1].*
FROM [Table 1] INNER JOIN [Table 2] ON [Table 1].[Key Field] = [Table 2].[Key Field]
DELETE [Table 1].*
FROM [Table 1] INNER JOIN [Table 2] ON [Table 1].[Key Field] = [Table 2].[Key Field]
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 165
- Joined: 03 Oct 2015, 00:30
Re: Delete Records using Query Builder
Hans:
Thank you!
Rich Locus
Thank you!
Rich Locus