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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete query in a one to many relationship.

Status
Not open for further replies.

robgoose

IS-IT--Management
Aug 24, 2003
4
US
I have recieved some assistance from some of you all but... I will be as clear as possible. To simplify it I have two tables with two fields that will have some repeating data and some unique data. Here is the picture.
table A table b
num let num let
1 a 1 a
1 a 1 a
1 a 2 a
1 a 2 b
2 a 3 c
2 b
3 c
4 c
The result I would expect to see is
1a , 1a and 4c
I have created a query that links the two num and let fields but that gives me all the data from Table A.
 
Why would you expect to see those results? What exactly are you looking for?
 
I would like to remove each instance from Table B that is included in Table A. There are multiple instances of the same data in A and B. But I only want to remove the number of B instances of a given combination from A.
 
robgoose

If I read your desired result correctly. 1a, 1a and 4c, Could you not do a delete query in each table using
num field having criteria in ("2","3")?

Cheryl [idea]

 
You need to link the table on both fields...then just delete those records...I don't think it should be too tough, just try to set it up in design view if you need to.

Kevin
 
When I link the tables left and right to create a query to use to delete I get more instances than I want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top