如何将单个Excel工作表数据导入多个Sql表 [英] How Can I Import Singal Excel Sheet Data To Multiple Sql Tables

查看:84
本文介绍了如何将单个Excel工作表数据导入多个Sql表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将单个excel表数据导入多个sql表。



假设我有一个包含10列的excel表。我想插入一些列1张桌子和不同表格中的一些列。



请让我知道怎么做。





关注

How can i import singal excel sheet data to multiple sql tables.

suppose i have an excel sheet containing 10 columns.i want to insert some of column in 1 table and some of columns in different tables.

please let me know how can do that.


Regards

推荐答案

这与将数据导入一个表格基本相同:

- 你有每个表的单独命令

- 循环遍历Excel文件中的行

- 对于表1命令,您可以设置要存储在该表中的那些参数

- 执行表1的命令

- 对于表2命令,您设置要存储在该表中的那些参数

- 执行表2的命令

- 等等
It's basically the same as importing the data into one table:
- you have separate commands for each table
- you loop through the rows in the Excel file
- for table 1 command you set those parameters you want to store in that table
- execute command for table 1
- for table 2 command you set those parameters you want to store in that table
- execute command for table 2
- and so on


这篇关于如何将单个Excel工作表数据导入多个Sql表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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