insert into ivrgen (mobile) select cast(CAST(mobile as int) as varchar(8)) FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=d:/listMgr/list.xls;Extended Properties=Excel 5.0')...[sheet1$]
注意:Excel格式
mobile
12345678
23456789
.
.
.
本文介绍了一种使用T-SQL语句将Excel文件中的数据导入到数据库的方法。具体操作是通过OPENDATASOURCE函数连接到Excel数据源,并利用insert into语句实现数据的插入。这种方法适用于需要批量导入数据的场景。
insert into ivrgen (mobile) select cast(CAST(mobile as int) as varchar(8)) FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=d:/listMgr/list.xls;Extended Properties=Excel 5.0')...[sheet1$]
注意:Excel格式
mobile
12345678
23456789
.
.
.

被折叠的 条评论
为什么被折叠?