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

ACCESS数据导入到SQL Server2005


在SQL Server2005中选中要导入数据的库 > 右键 > 新建查询:
执行SQL语句如下:
insert into
目标数据库表名 (字段1,字段2,....) select
字段1,字段2... from
openrowset
('microsoft.jet.oledb.4.0',';database=源数据库路径(如:d:\test.mdb)','select * from 源表 where 查询条件')
SQL 语句启用组件Ad Hoc Distributed Queries
1.启用
exec
sp_configure 'show advanced options',1
reconfigure
exec
sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
exec
sp_configure 'show advanced options',0
reconfigure
/*
配置选项 'show advanced options' 已从 1 更改为 1。请运行 RECONFIGURE 语句进行安装。
配置选项 'Ad Hoc Distributed Queries' 已从 1 更改为 1。请运行 RECONFIGURE 语句进行安装。
*/
2.关闭
exec
sp_configure 'show advanced options',1
reconfigure
exec
sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec
sp_configure 'show advanced options',0
reconfigure


相关文档:

测试一下自己的SQL水平

 
create table Student(Sname varchar(10),Ssex varchar(5),Sage int,S# int)
insert into Student
select '夏亮','男','21','1004'
select '成平','男','20','1001' union all
select '王波','男','19','1002' union all
select '突然','女','19','1003'
 
create table Course(C# varchar(10),Cname v ......

SQL时间格式转换大全

                                                   ......

基本SQL语句

DDL:数据库定义语言(create ,alter,modify)可自动提交。
DML:数据库操作语言(insert, update,alter)应设SET AUTOCOMMIT ON
DCL:数据库控制语言(grant,deny,revoke)
create table table_name (column_name type [not null] [constraint constraint_definition default XXXXXX] )
[primary key (column_name,col ......

SQL Server数据库镜像配置步骤

一、使用证书实现主备SQL Server实例的互通
1.在主机和备机上分别创建证书
在主机上执行如下语句:
USE master;
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'abcdefg';
CREATE CERTIFICATE CERT_HOST_A WITH SUBJECT = 'HOST_A certificate' ,
START_DATE = '01/01/2010';
GO
在备机上执行如下语句:
USE master; ......

SQL数据记录集重复的问题

调试SQL数据,发现数据记录集重复问题,所以,计算出的数据结果倍数问题。通过调试SQL,发现是物料的分类产生重复;之所以产生重复,物料的分类标准不一样,与实际的业务有关。程序中一直用类别来区分类别,而这张次实际业务不需要与类别有关,所以,没有对应的过滤条件,所有的类别全部选出来了。然后,把下面的红色字段注 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号