Importing and Exporting Data

CarrieFisher

Registered User.
Local time
Today, 11:58
Joined
Feb 25, 2011
Messages
27
Good Morning,

I am using Access 2010 and have two databases, one is located in Canada and the other in an Island near Australia. They are located on two different servers, and one has high-speed access to the internet, and the other is worse than dial-up.


I have developed queries that I want to export and send them the file to which they can then import into the other database that I have created.

I have no troubles doing this, but it duplicates that data. How can I make it so it only appends. When I do data entry in my current database it does not save the date in which the information is added into the database (the main one). So I can not do a query by date.

Can you please recommend how I do this?

- should I have it add a date automatically when a entry is added into the main database. If so, can you please recommend how I do this?

I welcome any suggestions.

Please note, I am very junior - so please feel free to explain it to me as if I was a child.

Thank you in advance - Carrie
 
to avoid doubles import only what's not already there:
Code:
INSERT INTO tbl1 ( Field1, Field2, Field3)
SELECT tbl2.Field1, tbl2.Field2, tbl2.Field3
FROM tbl2
WHERE (((tbl2.Field1) Not In (select tbl1.field1 from tbl1)));
In this example records are appended from tbl2 into tbl1 but only when those records not already exists in tbl1.

and here is the same query using a join.
Code:
INSERT INTO tbl1 ( field1, field2, field3 )
SELECT tbl2.field1, tbl2.field2, tbl2.field3
FROM tbl2 LEFT JOIN tbl1 ON tbl2.field1 = tbl1.field1

second one is faster.

Share & Enjoy!
 

Users who are viewing this thread

Back
Top Bottom