如何将数据从一个访问数据库表移动到SQL数据库中的多个表 [英] How to move data from one table of access database to multiple tables in SQL database

查看:81
本文介绍了如何将数据从一个访问数据库表移动到SQL数据库中的多个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有包含多列的MST_CUSTOMERS表。现在我想将数据从MST_CUSTOMERS表导入SQL数据库。问题是MST_CUSTOMER表包含客户,教师,汽车,工作细节等的数据。我想在SQL中的特定表中移动/复制数据。对于例如客户的数据应该在SQL中的Customer表中移动,指导员的数据应该在SQL中的Instructor表中移动/复制,汽车的数据应该在Car表中移动/复制,而工作细节应该在SQL的JOB_DETAILS表中移动/复制。

我该怎么办?请帮帮我。



我的尝试:



任何人都可以解决这个?请帮我。我不明白该怎么做。

I have MST_CUSTOMERS table containing multiple columns. Now I want to import the data from MST_CUSTOMERS table to SQL database. The problem is MST_CUSTOMER table contains data of customer, instructor, car, job details, etc. And I want to move/copy data in specific tables in SQL. For e.g. customer's data should move in Customer table in SQL, instructor's data should move/copy in Instructor table in SQL, car's data should move/copy in Car table, and job details should move/copy in JOB_DETAILS table in SQL.
How can I do that??? Please help me.

What I have tried:

Can anyone solve this?? Please help me. I didn't understand what to do.

推荐答案

你几乎没有办法解决你的问题。

A。 下载并安装 Microsoft SQL Server迁移助手7.10以获取访问权限 [ ^ ];然后按照向导的步骤操作;

B。你可以使用 BULK命令 [ ^ ]

C. 你可以使用 SQLBulkCopy类 [ ^ ];这很简单:

   1。连接到MS Access数据库

   2。创建命令以获取相应的数据

   3。将数据加载到DataTable

   4。关闭与MS Access数据库的连接

   5。连接到MS SQL Server

   6。将数据从数据表复制到正确的MS SQL Server表

   7。与MS SQL Server的紧密连接



这就是全部!
You've got few ways to resolve your issue.
A. download and install Microsoft SQL Server Migration Assistant 7.10 for Access[^]; Then follow the steps of wizard;
B. you can use BULK command[^]
C. you can use SQLBulkCopy class[^]; It's quite easy:
  1. Connect to MS Access database
  2. Create command to get corresponding data
  3. Load data into DataTable
  4. Close connection to MS Access database
  5. Connect to MS SQL Server
  6. Copy data from datatable to proper MS SQL Server table
  7. Close connection to MS SQL Server

That's all!


我会选择像SSIS这样的ETL。 />
您提供的信息很少,几乎可以解决所有问题。
I would go for an ETL like SSIS, for example.
You provided so few informations that it is practically all that can be answered at that point.


这篇关于如何将数据从一个访问数据库表移动到SQL数据库中的多个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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