Append Query

  • Thread starter Thread starter jenni
  • Start date Start date
J

jenni

Hi -
I posted earlier, but need to revise my question.

I have an append query that adds records to a table.
Then, I split that table.
The 2 tables are now
1) tbl_PR_PIN - this contains the "one side" with 3
fields that consolidated into one.
2) tbl_PR_details - this contains the many side of the
split table.
Now, when I run the append query to add new records, it
is not putting unique values into the tbl_PR_PIN.
Instead it is adding one line for each detail record.
How do I fix this so that it will update one "PIN" record
with multiple detail records??
Any help on this would be greatly appreciated!
Thanks,
 
Hi Jenni,

It's a little hard to answer this without knowing more
detail about the source of the query and the actual query
sql, but it sounds like you need two append queries, one
to update each table. For the append query for the PIN
table, you could set it to output only one record per PIN
by setting the "unique values" property of the query to
true, or by making it a "Totals" query and grouping by
the PIN values. If there is a chance that the PIN may
already exist in the table, you could also set a criteria
that the PIN value in the existing table Is Null.

But, it sounds like the PIN is the Primary Key for the
PIN table. If this is the case, and you have set that
field as the primary key, any attempts to append
duplicates should be rejected anyway.

Hope that helps. Post back if I misunderstood your
question or if you have any other questions.

-Ted Allen
 
Back
Top