从不同的数据库导入到的语法-MS Access [英] Syntax for Import Into from Different DBs - MS Access

查看:88
本文介绍了从不同的数据库导入到的语法-MS Access的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试(基本上)从一个后端到另一个后端进行自动行复制,因为后端正在使用但尚未完全开发(某些表已完成,另一些未完成;将完成的数据添加到更高级的db中在一天结束时.)

I'm trying to do (basically) an automated row copy from one backend to another as the backend is being used but is not fully developed (some tables are done, others not; adding the completed data into the more advanced db at the end of the day).

我想知道SQL语句的语法是什么

I'd like to know what the syntax is for an SQL statement which:

INSERT INTO tblMyBetterTable * IN "C:\\path_to_db\db.accdb"
FROM tblMyTable IN "C:\\path_to_in_use_db\in-use-db.accdb"

语法不正确,但是我搜索了一段时间,无法找到方法..我已经看到了如何从一个表导入到另一个表,但是没有跨后端导入.如果不清楚,我想基本上将in-use-db.accdb中所有行的表副本从tblMyTable复制到后端db.accdb的表tblMyBetterTable的最新版本.

The syntax is not correct but I've searched for a while and can't find out how.. I've seen how to import from one table to another etc, but not across backends. If it's not clear, I'd like to basically do a table copy of all rows in in-use-db.accdb from tblMyTable to the latest version of the backend db.accdb's table tblMyBetterTable.

推荐答案

我建议您尝试对于查询,您需要以下内容:

For a query, you need something on the lines of:

SELECT * INTO NewTable 
FROM [;DATABASE=Z:\Docs\Test.accdb].Table1

反之亦然:

SELECT * INTO [;DATABASE=Z:\Docs\Test.accdb].NewTable
FROM Table1

要插入现有表中,请执行以下操作:

To insert into an existing table:

INSERT INTO table1 
SELECT * 
FROM [;DATABASE=Z:\Docs\Test.accdb].Table1

这篇关于从不同的数据库导入到的语法-MS Access的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆