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

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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 :huh: , 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,223,261
Messages
6,171,076
Members
452,377
Latest member
bradfordsam

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