473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Merge two tables

Recently the table has been delete some records by mistakes. Now, I have a
backup of about one-week old table and the latest table with some deleted
records. I would like to merge these two tables by importing the latest
update records and new records to the old table. Can someone give me some
guidance how to accompany this task.

Thanks,

Scott

Jul 7 '07 #1
2 5482
if the "deleted records", that are missing from the new table, can be found
in the old table, then i suggest you do it the other way around: add the
missing records into the new table, from the old table. use the Query Wizard
to write an Unmatched Records query, looking for the records in the old
table that are not included in the new table. then turn that query into an
Append query, and append those records into the new table.

hth
"Scott" <No*************@GMail.comwrote in message
news:5f*************@mid.individual.net...
Recently the table has been delete some records by mistakes. Now, I have
a
backup of about one-week old table and the latest table with some deleted
records. I would like to merge these two tables by importing the latest
update records and new records to the old table. Can someone give me some
guidance how to accompany this task.

Thanks,

Scott


Jul 7 '07 #2
Tina,

Thanks for your smart advice. I tried but received some strange response.

Firstly, I found unmatched records of 133. I used query to make a new table
of 133 records. Then I uses AppendQuery to append the new table to the
table that missing records. It came out below error.

Microsoft Office Access can't append all the records in the append query.

Microsoft Office Access set 0 field(s) to Null due to a type conversion
failure, and it didn't add 91 record(s) to the table due to key violations,
0 records(s) due to lock violations, and 42 records(s) due to validation
rule violations.
Do you want to run the action query anyway?
To ignore the error(s) and run the query, click Yes.
For an explanation of the causes of the violations, click Help.

I cliked Yes and append 91 records to the table. What is wrong with the
rest and any possible fixes? Your further advice is appreciated.

Thanks,

Scott
"tina" <no****@address.comwrote in message
news:6e*********************@bgtnsc04-news.ops.worldnet.att.net...
if the "deleted records", that are missing from the new table, can be
found
in the old table, then i suggest you do it the other way around: add the
missing records into the new table, from the old table. use the Query
Wizard
to write an Unmatched Records query, looking for the records in the old
table that are not included in the new table. then turn that query into an
Append query, and append those records into the new table.

hth
"Scott" <No*************@GMail.comwrote in message
news:5f*************@mid.individual.net...
>Recently the table has been delete some records by mistakes. Now, I have
a
>backup of about one-week old table and the latest table with some deleted
records. I would like to merge these two tables by importing the latest
update records and new records to the old table. Can someone give me
some
guidance how to accompany this task.

Thanks,

Scott



Jul 8 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Pierre-Luc Soucy | last post by:
Hi, I was working on some merge tables this morning and it worked fine, but after a few unsuccessful table creation requests (I was making some tests), I could not alter or select from a table...
0
by: Johannes B. Ullrich | last post by:
--=-WKgoK98ejo9BZyGYc3N/ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I am having problems with MySQL 4.0.12 on RedHat Advanced Server 2.1 using a dual Xeon with 8...
1
by: Shane Niebergall | last post by:
If I have a merge table that is made up of a set of tables and I want to change the structure of the underlying tables, how do I do it? Will I be allowed to change each table one at a time even...
2
by: Dave | last post by:
Hi everyone. I have an interesting problem. We have two PHP shops that use MySQL databases. The database structures are exactly he same. Due to the two companies now working together we want the...
2
by: mfyahya | last post by:
I have two tables, both containing an 'authors' column. Is there a way to get a unique list of authors from the two tables? I tried SELECT DISTINCT `authors` from `table1`, `table2`; but I got an...
48
by: phillip.s.powell | last post by:
MySQL 3.23.58 - 4.0.17 (yep, several database server instances, don't ask) I have database Spring with table Students I have database Summer with table Students I am tasked to produce a...
2
by: admin | last post by:
I was wondering if there is a way to create a merge table using where clauses for the underlying tables. I have a date column in all tables and would like to have it so that I could just inset say...
2
by: JK | last post by:
I saw Danny Lesandrini's article on Database Journal (http://www.databasejournal.com/features/msaccess/article.php/2236471) on how to merge tables from identical databases. This is exactly what...
0
by: raviee | last post by:
Hi Can anyone help me how to merge two database with all objects in sql server 2005. I have two database ie. a.MDF, b.MDF i want a new database c.mdf . simple merge only merge tables... i want...
4
by: Miguel Valenzue | last post by:
I want to expand upon this now (of course) and during the import, take that road name and dataset name and insert it into a seperate table. This will allow me to link all the data from the imported...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.