select *
from openrowset('Microsoft.Jet.OLEDB.4.0'
,'Excel 8.0;HDR=YES;IMEX=1;DATABASE=d:\folder\excel.xls',Sheet1$)
-------NOTE------
Setting IMEX=1 tells the driver to use Import mode. In this state, the registry setting ImportMixedTypes=Text will be noticed. This forces mixed data to be converted to text. For this to work reliably, you may also have to modify the registry setting, TypeGuessRows=8. The ISAM driver by default looks at the first eight rows and from that sampling determines the datatype. If this eight row sampling is all numeric, then setting IMEX=1 will not convert the default datatype to Text; it will remain numeric.
You must be careful that IMEX=1 not be used indiscriminately. This is IMPORT mode, so the results may be unpredictable if you try to do appends or updates of data in this mode.
The possible settings of IMEX are:
0 is Export mode
1 is Import mode
2 is Linked mode (full update capabilities)
Select data from an Excel sheet in MSSQL
2021-09-07 17:37数据库教程网 数据库技术
本文主要为大家介绍Select data from an Excel sheet in MSSQL的一些语句示例,有需要的朋友可以参考下
延伸 · 阅读
- 2022-06-26golang select 机制和超时问题
- 2022-03-08Linux下Select多路复用实现简易聊天室示例
- 2022-03-05MSSQL 附加数据库提示“错误 823”数据恢复实操
- 2022-01-11易语言调用MS SQL SERVER数据库方法
- 2021-12-26护卫神主机管理系统使用说明之主机MSSQL管理
- 2021-12-21IO复用之select poll epoll的总结(推荐)
- 数据库技术
SQL UPDATE 更新语句用法(单列与多列)
更新操作是数据库中最常用的操作之一,下面将为您介绍update语句的三种使用方法,供您参考,希望对您有所帮助...
- 数据库技术
伴鱼基于 Flink 构建数据集成平台的设计与实现
数据仓库有四个基本的特征:面向主题的、集成的、相对稳定的、反映历史变化的。其中数据集成是数据仓库构建的首要前提,指将多个分散的、异构的数...
- 数据库技术
带参数的sql和不带参数的sql存储过程区别
来执行我们sql语句,看到很多分页存储过程都是直接拼凑sql语句然后用exec('')执行起来了,这个从效率和安全上面来说,都是不推荐的。...
- 数据库技术
SQL中过滤条件放on和where中的区别详解
这篇文章主要给大家介绍了关于SQL中过滤条件放on和where中的区别,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需...
- 数据库技术
谈谈数据库的字段设计的几个心得
今天小编就为大家分享一篇关于谈谈数据库的字段设计的几个心得,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随...
- 数据库技术
数据库中的左连接(left join)和右连接(right join)区别
关于左连接和右连接总结性的一句话,左连接 where只影向右表,右连接where只影响左表...
- 数据库技术
Mybatis分页插件的实例详解
这篇文章主要介绍了Mybatis分页插件的实例详解的相关资料,需要的朋友可以参考下...
- 数据库技术
PowerDesigner 12.5汉化特别版安装图文教程
PowerDesigner 12.5是这个数据库建模工具的经典版本,很多童鞋喜欢使用这个版本了。当然如果您喜欢高版本,也是可以的,本文就PowerDesigner 12.5安装破解进行...