易截截图软件、单文件、免安装、纯绿色、仅160KB

Excel导入SQL SERVER中

--Excel导入SQL SERVER中
--表结构不存在可以使用
--启用Ad Hoc Distributed Queries:
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
select * into serv_user_bak1 from
OpenRowSet('microsoft.jet.oledb.4.0','Excel 8.0;HDR=yes;database=c:\test.xls;','select * from [Sheet1$]')
---使用完成后,关闭Ad Hoc Distributed Queries:
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure
-----------------------------------------------------------
--表结构存在可以使用
--启用Ad Hoc Distributed Queries:
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
insert into serv_user_bak1
SELECT * from
OpenRowSet('microsoft.jet.oledb.4.0','Excel 8.0;HDR=yes;database=c:\test.xls;','select * from [Sheet1$]')
---使用完成后,关闭Ad Hoc Distributed Queries:
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure


相关文档:

sql server 全文检索,功能介绍,应用特点总结。

在一个数据表里,有3个字段,如下:
ID           自动增加,已建索引
TITLE      nvarchar(255)
CONTENT ntext(16)
对title字段进行“like”查询,速度还行。但是要对content字段,进行“like”查询,速度很慢,不可 ......

SQL生成随机字符串

declare @str varchar(50)
 declare   @i   int  
 set @str = ''
   set   @i=0  
   while   @i<50 
   begin  
        set   @str = ......

SQL命令大全

[code=SQL][/code]
--语 句 功 能 
--数据操作 
SELECT --从数据库表中检索数据行和列 
INSERT --向数据库表添加新数据行 
DELETE --从数据库表中删除数据行 
UPDATE --更新数据库表中的数据
--数据定义 
CREATE TABLE --创建一个数据库表 
DROP TABLE --从数据库中删 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号