Delete Query or maybe is it MATCHING??

xljruser

New Member
Joined
Feb 1, 2005
Messages
6
Good morning.

I’m having a problem with a relatively easy query problem. Im not sure if it’s a delete query I want, or a matching query. I want to delete duplicate records.

If the records from a certain column in table B appear in table A, then I would like to delete those records. I can set up a regular query which gives me the duplicate records, which I then need to delete. But when I hit delete, I get an error message saying “can delete. Read only”. Basically I want to delete records from TABLE A if they match records from TABLE B.

What am I missing here?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Yes, you want a delete query.

The rectangular grid that you get when you run a query is just like what you get when you hit Enter on a Table name - it's the Datasheet View. However the delete key is only active when you're working with a table - not a query.

No offense, but since delete queries are like, uh, injurious to your health :unsure: , develop and practice this new skill on copies of data..

Try the create delete query wizard and compare it to what you would have come up with on your own.

Note that the records that are displayed for a delete query are indeed the ones that are deleted. So it's consistent with your instinct which was to hit the delete key for those records.
 
Upvote 0

Forum statistics

Threads
1,221,902
Messages
6,162,726
Members
451,782
Latest member
LizN

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top