Insert, Append, Update?

eyal8r

Registered User.
Local time
Today, 13:14
Joined
Aug 30, 2007
Messages
76
Hey guys-
I have a 'Master Table' that holds all my imported records. After a few queries and whatnot- I need to break it down into specialized tables. For example- my Sales Associate info goes into one table (all their contact info, employee code, etc)- while the product info goes into another table.

As I import daily orders and whatnot- it also brings in the sales associates info. So, I want to have Access check the existing SalesEmployee Table for any existing records (by their employee code)- and if it doesn't exist, append it into the table. HOWEVER- if they are already showing in the SalesEmployee Table, I want it to check to see if their contact info is the same- if not, update it with the new info I am importing.

How do I go about doing this? Is this an update query all by itself? Or, do I need a more complex if/then statements and whatnot?
Thanks!
 
If you are going to assume the incoming data is the latest then you do not need to test to see if it is the same, just update.
 
ok- so that I am clear...
If I do an update, it will update the exsiting records, AS WELL AS load in any new records that don't exist there yet?
Thanks bud!
 
ok- so that I am clear...
If I do an update, it will update the exsiting records, AS WELL AS load in any new records that don't exist there yet?
Thanks bud!

You need an Append query to add new records to a table. An Update query will change fields in existing records. See Access help for more information on the different query types.
 
huh. OK- so- if that's the case- do I need to make 2 different statements/passes at this? One to update the existing records, another to append them? How would I go about doing that?
Thanks again
 
Any more hints on this one? I'm not sure how to go about checking to see if it's an existing record, or if it will be a new record...
Thanks for all the help you can give!
 

Users who are viewing this thread

Back
Top Bottom