Adding data from temp table

Phoenix Tech

New member
Local time
Today, 10:49
Joined
Oct 23, 2010
Messages
3
Hi guys i am importing an excel sheet into access to create categories

when i import i do it to a TEMP_Category Table that does not have a primary key (or else i get violation errors all the time)

now im trying to run an append query to join the data between TEMP_Category and my Category table just one problem when i do that it either creates duplicates in the Category Table or if i set the ID to append to the Category ID i get more access violation errors. due to the Category ID being a Primary Key

how do i add or update data in existing tables??
 
If you need the all records from the "TEMP-Category" table, then
you have to change a Primary key in the table "Category". Maybe to
add 1 field (autonumber) and put it as a Primary key. Or to make a
Primary key of the autonumber field and ID field (2 fields).
 
Perhaps the example I posted here will give you some pointers
 
Should also mention that you will need to copy both files to the same directory.

The excel worksheet is imported to a temp table and then a series of Find unmatched and find matched queries are used to determine which records to import and which existing records need to be updated.
 

Users who are viewing this thread

Back
Top Bottom