Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merging AccessDB on 2 difft machines, same db & tables, difft data

Status
Not open for further replies.

rashi30

Technical User
Apr 6, 2005
8
US
I have this Access DB that has records(recs in thousands) in tables from Day1 to Day60 on machine1.
Had taken a backup of this on Machine2 on Day30. Machine1 is unusable after Day60 (it crashed,but the data was recovered on CD)
Then started using machine2 which has DB data from Day1-Day30 and Day60-tilldate.

The DB is same & tables are same with same format.
Now how do I consolidate the data? I mean Machine2 has Day30-60 missing. The CD has only till Day60. Thought maybe Import data from Table option with Append would do it...but I guess thats not there.

I tried running Append query like:
INSERT INTO [T1] (FIELD1,FIELD2) IN 'ABC.mdb'
SELECT [T1].FIELD1 , [T1].FIELD2
FROM [T1]
WHERE ((([T1].FIELD1) <> FIELD1 ));

This doesnt work. Am trying to add all extra recs from current db to abc.mdb....basically dont know how to refer to field1 of the t1 in abc.mdb in last line. Thats wots wrong I think.
Can someone please correct this or suggest something else. It would be of great help. Please HELP!!!
 
rashi30,

I probably don't need to say this, but first back up both databases.

Unless these are incredibly large fields, you can just copy the appropriate records from the table in machine 1 and paste them into the table in machine 2. You can also copy from a query, so you can select all of the missing rows first, then just click in the upper left box to select all rows/columns. Then copy and paste to the table on machine 2.

Alternatively, you can:
make the date the primary key in the table on machine 2

link the machine 1 table into the machine 2 database (file|Get external Data|Link tables)

run a sql command: Insert into <original machine 2 table> select * from <linked table>

When the sql runs, you will get a message that you are about to insert x rows from table? to table?

Say OK

You will get a message that says something like "X number of rows were not inserted because they caused key violations or duplicate keys or something like that. This is normal--Just say OK.

Your table will now contain the appropriate rows.

Sorry I can't tell you exactly what the messages say, but I'm using my Linux machine, so can't run Access.

Good Luck,
Tranman

"Adam was not alone in the Garden of Eden, however,...much is due to Eve, the first woman, and Satan, the first consultant." Mark Twain
 
Thanx Tranman.
Since there was no date in the table...altering your second option, I tried to copy the whole table from 1 DB version to another. There is this append option there(when I try pasting). It asked me insert question & something more...but I went ahead & tried & it worked.
Thanx again for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top