Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi My query has 3 columns, 'PCD,' 'Reference' and 'Code'. PCD

Status
Not open for further replies.

Richey

Technical User
Aug 29, 2000
121
GB
Hi
My query has 3 columns, 'PCD,' 'Reference' and 'Code'.

PCD Ref Code
CH4 2HX 85 T
CH4 2HX 79 T
CH3 1BU 75 F
CH3 1BU 102 T

I would like a query that says if PCD is the same and the code is the same then delete the rows, but if PCD is the same and the Code is different do not delete the rows, so in this example I'd be left with

PCD Ref Code
CH3 1BU 75 F
CH3 1BU 102 T

Help would be much appreciated
Regards
Richey
 
Richey,

Use the Find Duplicates Query, and use the results to delete them with a delete query.

Do the dupes query first, and look at the table vue to verify the selected records.
Then do a delete query, calling the dupes query as the source.

alley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top