如何使用查询在SQL Server中导入Excel工作表。 [英] How to import excel sheet in SQL server using query.

查看:379
本文介绍了如何使用查询在SQL Server中导入Excel工作表。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 sql server 中使用查询<导入Excel工作表 / pre> 



1.在excel中有3张(emp,manager,dept),这些工作表有自己的列和数据。



2.因此,将数据从excel插入sql表的方式就像sheetName一样,与sql TableName&他们的数据。



3.我不运行查询三次意味着当我们运行查询/脚本时,他们会插入这3个表...或者更多。



我的尝试:



SQL Server Helper - 提示和技巧 - 查询和导入Excel文件

解决方案

以下是使用分布式查询的好文档

关于使用TSQL导入Excel数据的问题你太害羞了 - 简单谈话 [ ^ ]


how to import excel sheet in sql server using query



1. Like in excel have 3 sheets (emp, manager, dept) and these sheets have their own columns and data.

2. So the manner to insert data from excel to sql's table is like sheetName same as sql TableName & their data.

3.and I do not run query three times means when we run query/script they insert these 3 table ...or many more.

What I have tried:

SQL Server Helper - Tips and Tricks - Query and Import an Excel File

解决方案

Here is good documentation around using Distributed Queries
Questions About Using TSQL to Import Excel Data You Were Too Shy to Ask - Simple Talk[^]


这篇关于如何使用查询在SQL Server中导入Excel工作表。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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