简体   繁体   English

Access 2010将记录从旧数据库更新到新数据库

[英]Access 2010 updating records from old database to new database

I am recreating a new database from an older database, for many reasons. 由于多种原因,我正在从旧数据库重新创建新数据库。 The employees are still using the old database. 员工仍在使用旧数据库。 I have a draft copy of the old one with the same Client table. 我有一个旧的草稿副本,带有相同的Client表。

I need to update my information such as addresses , phone number and other fields in the my new Client table from the old Client table before they can use it. 我需要从旧客户端表中更新新客户端表中的addressesphone number和其他字段之类的信息,然后他们才能使用它们。

I am trying to write and SQL query to update new Client_table.newdatabase with old Client_table.olddatabase. 我正在尝试编写和SQL查询以使用旧的Client_table.olddatabase更新新的Client_table.newdatabase。 Can anyone help? 有人可以帮忙吗?

It depends on the data you have in the old and new tables. 这取决于您在新旧表中的数据。 Are there fields that match in both tables? 两个表中都有匹配的字段吗? if so and it is the names of clients, are they spelled the same in both tables? 如果是这样,并且这是客户的名称,两个表中的拼写是否相同?

I would also think about adding this to a third (new) table to prevent any type of data loss while trying this process. 我还考虑将其添加到第三张(新)表中,以防止在尝试此过程时任何类型的数据丢失。 The query to use for a new third table is below. 下面是用于新的第三张表的查询。

SELECT NewTable.ClientName, OldTable.Address, OldTable.Phone
  INTO NewThirdTable
FROM NewTable
  INNER JOIN OldTable ON NewTable.MatchingField = OldTable.MatchingField; 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM