易截截图软件、单文件、免安装、纯绿色、仅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*PLUS中函数

创建函数
CREATE OR REPLACE FUNCTION ntfuc(inp IN NUMBER)
RETURN NUMBER
IS
ntmp NUMBER;
BEGIN
ntmp := inp;
RETURN ntmp;
END ntfuc;
/
执行该函数时
DECLARE
rcn NUMBER;
BEGIN
rcn := ntfunc(1);
END;
/ ......

SQL语言基础

SQL:Structured Query Language,1974年Boyce和Chamberlin提出.
数据定义 :CREATE,DROP
数据库查询:SELECT
数据操纵 :INSERT,UPDATE,DELETE
数据控制 :GRANT,REVOKE
一.数据的定义和修改:
1.定义基表
CREATE TABLE 表名 (<列名1 类型[NOT NULL][,列名2 类型[NOT NULL]>…[其他参数]);
关于类型:
INTEGE ......

SQL Server 2005 Driver for JDBC


Load the SQL Server 2005 Driver for JDBC before you load the SQL Server 2000 Driver for JDBC. To do this, use the DriverManager class as in the following code example.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); // 2005 version
Class.forName("com.microsoft.jdbc.sqlserver.SQLSe ......

sql server选择了混合模式问题

sql server选择了混合模式问题
因为要选择混合模式才能使用sa用户登录的问题
然后企业管理器里面竟然选了以后没有效果 永远都是仅windows模式
无语 不断重启mssql 又选择 混合模式  大约几分钟后竟然可以选择了
zhenTMD 的无奈! ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号