appending records without creating duplicates in a non-indexed table

A

Applebaum

Hello,

Our setup includes the following:

tblCategoryAssignments
----------------------
AssignmentID (pk)
ContactID
CategoryID
OrganizationID

tblHappyPeople
--------------
ContactID (pk)


There are about 1000 records in tblHappyPeople. I want to make sure the
they all have a category assignent. CategoryID 8 is for Happy. If someone
is Happy, they get a record in tblCategoryAssignments with their contactID
and 8 for CategoryID.

Of the 1000 happy people, 100 of them already have their appropriate
category assignment.

How can I add the remaining 900 records?

If I do an append query to tblCategoryAssignments, there will be duplicated
records. I cannot make a no-duplicates index, because
tblCategoryAssignments also tracks Organizations' categories.

Should I have instead used two tables for category assignments, one for
organizations and one for contacts?

Thank you very much in advance,

Matthew
 
A

Applebaum

I found a workaround, thanks anyway.

FYI, I went ahead and added all of the records. Then I ran a Find
Duplicates Query, and I figured that the ones that were added most recently
(highest AssignmentIDs) were the dupes that I didn't need and got rid of
them.

Thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top