- 浏览: 1800558 次
- 性别:
- 来自: 南京
文章分类
最新评论
-
cht的大摩托:
学习
IBM WebSphere Performance Tool / ISA / jca457.jar / ha456.jar / ga439.jar -
leeking888:
有没有linux 64位的相关librfccm.so等包啊?
web test LoadRunner SAP / java / Java Vuser / web_set_max_html_param_len -
paladin1988:
非常不错,多谢了。。
appServer IBM WebSphere / WAS 7 / 8.5 / was commerce -
hzxlb910:
写了这么多
net TCP/IP / TIME_WAIT / tcpip / iperf / cain -
acwyg:
ed2k://|file|LoadRunner.V8.1.is ...
web test performance tools / linux performance tools / windows performance tools
sdfsdafsdf
http://user.qzone.qq.com/170475387/blog/13
一、SQL SERVER 和ACCESS的数据导入导出
常规的数据导入导出:
使用DTS向导迁移你的Access数据到SQL Server,你可以使用这些步骤:
○1在SQL SERVER企业管理器中的Tools(工具)菜单上,选择Data Transformation
○2Services(数据转换服务),然后选择 czdImport Data(导入数据)。
○3在Choose a Data Source(选择数据源)对话框中选择Microsoft Access as the Source,然后键入你的.mdb数据库(.mdb文件扩展名)的文件名或通过浏览寻找该文件。
○4在Choose a Destination(选择目标)对话框中,选择Microsoft OLE DB Prov ider for SQL Server,选择数据库服务器,然后单击必要的验证方式。
○5在Specify Table Copy(指定表格复制)或Query(查询)对话框中,单击Copy tables(复制表格)。
○6在Select Source Tables(选择源表格)对话框中,单击Select All(全部选定)。下一步,完成。
Transact-SQL语句进行导入导出:
1.在SQL SERVER里查询access数据:
Select * FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0','Data Source="c:\DB.mdb";User ID=Admin;Password=')...表名
2.将access导入SQL server
在SQL SERVER 里运行:
Select * INTO newtable FROM OPENDATASOURCE ('Microsoft.Jet.OLEDB.4.0','Data Source="c:\DB.mdb";User ID=Admin;Password=' )...表名
3.将SQL SERVER表里的数据插入到Access表中
在SQL SERVER 里运行:
insert into OpenDataSource( 'Microsoft.Jet.OLEDB.4.0','Data Source=" c:\DB.mdb";User ID=Admin;Password=')...表名 (列名1,列名2) select 列名1,列名2 from sql表
实例:
insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0','C:\db.mdb';'admin';'', Test) select id,name from Test
Insert INTO OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'c:\trade.mdb'; 'admin'; '', 表名) Select * FROM sqltablename
二、SQL SERVER 和EXCEL的数据导入导出
1、在SQL SERVER里查询Excel数据:
Select * FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0','Data Source="c:\book1.xls";User ID=Admin;Password=;Extended propertie*=**cel 5.0')...[Sheet1$]
下面是个查询的示例,它通过用于 Jet 的 OLE DB 提供程序查询 Excel 电子表格。
Select * FROM OpenDataSource ( 'Microsoft.Jet.OLEDB.4.0','Data Source="c:\Finance\account.xls";User ID=Admin;Password=;Extended propertie*=**cel 5.0')...xaction*
2、将**cel的数据导入SQL server :
Select * into newtable FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0','Data Source="c:\book1.xls";User ID=Admin;Password=;Extended propertie*=**cel 5.0')...[Sheet1$]
实例:
Select * into newtable FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0','Data Source="c:\Finance\account.xls";User ID=Admin;Password=;Extended propertie*=**cel 5.0')...xactions
3、将SQL SERVER中查询到的数据导成一个Excel文件
T-SQL代码:
EXEC master..xp_cmdshell 'bcp 库名.dbo.表名out c:\Temp.xls -c -q -S"servername" -U"sa" -P""'
参数:S 是SQL服务器名;U是用户;P是密码
说明:还可以导出文本文件等多种格式
实例:EXEC master..xp_cmdshell 'bcp saletesttmp.dbo.CusAccount out c:\temp1.xls -c -q -S"pmserver" -U"sa" -P"sa"'
EXEC master..xp_cmdshell 'bcp "Select au_fname, au_lname FROM pubs..authors orDER BY au_lname" queryout C:\ authors.xls -c -Sservername -Usa -Ppassword'
在VB6中应用ADO导出EXCEL文件代码:
Dim cn As New ADODB.Connection
cn.open "Driver={SQL Server};Server=WEBSVR;DataBase=WebMis;UID=sa;WD=123;"
cn.execute "master..xp_cmdshell 'bcp "Select col1, col2 FROM 库名.dbo.表名" queryout E:\DT.xls -c -Sservername -Usa -Ppassword'"
4、在SQL SERVER里往Excel插入数据:
insert into OpenDataSource( 'Microsoft.Jet.OLEDB.4.0','Data Source="c:\Temp.xls";User ID=Admin;Password=;Extended propertie*=**cel 5.0')...table1 (A1,A2,A3) values (1,2,3)
T-SQL代码:
Insert INTO
OPENDATASOURCE('Microsoft.JET.OLEDB.4.0','Extended Propertie*=**cel 8.0;Data source=C:\training\inventur.xls')...[Filiale1$] (bestand, produkt) VALUES (20, 'Test')
JDBC SQL*Profiler for SQLlog
http://heanet.dl.sourceforget.net/sourceforge/sqlprofiler/sqlprofiler-0.3-bin.zip
监控基于JDBC发向数据库的所有sql语句,并可以看到sql占位符代表的实际参数值
P6spy for SQL*Profiler UI
http://heanet.dl.sourceforge.net/sourceforge/p6spy/p6spy-install.zip
它可以把SQL Profiler生成的日志以友好的格式输出。
SQL精华
SQL筛选非重复记录
表Test Name a b c d e f d c b a sql语句: select * from test where test.name not in (select * from test group by name having count(*) > 1) 查询结果 Name e f 可能会有其它方法,我只做了这一种。 |
|
end
sadfsdfsdfs
发表评论
-
db RethinkDB
2017-11-04 10:33 905s RethinkDB 已倒闭。 如何安装Ret ... -
db H2 / h2 / h2 cluster / cubrid
2017-02-09 11:18 882s Version 1.4.193 (2016-1 ... -
db nosql redis / Redis Sentinel
2016-11-10 20:18 740s 课程> Web开发> PHP> Re ... -
db Oracle OLTP OLAP / apache kylin / druid
2016-08-16 14:24 1190s Druid is a high-performan ... -
db vfp / Visual FoxPro
2012-01-04 15:51 15542002年9月计算机二级VFP ... -
db base database
2011-12-18 22:09 1220数据库系统概论 http://www.chinadb.org ... -
db db2_monitorTool IBM Rational Performace Tester
2010-08-04 17:22 1703使用 Rational Performance Tester ... -
db dba experience
2010-05-08 10:55 1582请列出你在从事DBA生 ... -
db db2 v8.2
2010-03-09 21:05 4549db db2 doc http://publib.b ... -
db db2 v9.7 / 9.8
2010-03-08 16:31 4882db2 v9 infocenter http://pub ... -
db db2 base / instance database tablespace container
2009-12-24 11:14 3728DB2基本概念 —— 实例、数据库、表空间、容器 D ... -
db oracle books
2009-10-16 00:14 1137O'Reilly Oracle系列书籍导读 ... -
db SQL Server error_list
2009-10-15 23:36 2393http://oryx.iteye.com/blog/1544 ... -
db db2 soft
2009-10-14 18:46 2615http://www-01.ibm.com/softw ... -
db db2 books
2009-10-02 11:04 2329http://book.51cto.com/art/20090 ... -
db sql montior
2009-10-01 13:17 1165JProfiler 性能跟踪、测量工具,能跟踪、测 ... -
db oracle error_list
2009-09-18 16:39 1455oracle 文档 http://www.oracl ... -
db oracle
2009-09-18 15:47 1457·Oracle财务软件(Oracle Financial) ... -
db db2 dba
2009-09-07 19:04 2414db2 doc IBM DB2 数据库 Linux ... -
db db2 tools
2009-09-07 10:42 2658attention :toad和db2自带图形管理客户端 ...
相关推荐
example of restore db sql server
1- Save attached db2_regex.zip file to a new folder on the hard disk for example to C:\avalanche 2- Extract all files from the zip file to C:\avalanche\db2_regex 3- Open C:\avalanche\db2_regex\...
例子package promsql_testimport ("bufio""database/sql""fmt""net/http""strings""time""github.com/johejo/promsql"_ "github.com/go-sql-driver/mysql""github.com/prometheus/client_golang/prometheus""github.com/prometheus/client_golang/prometheus/promhttp")func Example () {db , err := sql . Open ( "mysql" , "CONNECTION_STRING...
example:db2icrt db2 -s ese -p d:\db2 -u Administrator 注意:在UNIX 上产生实例时需要产生一个和实例名称相同的用户名,和fencedid 用户。 如:db2icrt -s ese -u db2fenc2 db2inst2 将在db2inst2用户中产生...
transparently and securely to Microsoft Azure by using the Stretch Database (Stretch DB) feature. Chapter 7, Temporal Tables, introduces support for system-versioned temporal tables based on the SQL:...
All example SQL statements in this book execute against a set of tables, with data that you can quickly download. The third edition covers important database changes, including: Oracle's support of ...
sqlmapper is a light mapper between golang struct and table rows in db example We need to read/write a table in db, like: CREATE TABLE `test_table` ( `field_key` varchar(64) NOT NULL DEFAULT '', `...
In our example, if one transaction (T1) holds an exclusive lock at the table level, and another transaction (T2) holds an exclusive lock at the row level, each of the transactions believe they have ...
它提供了类似 SQL 的语法,并且可以跨浏览器工作(目前支持 Chrome 37 及以上版本,Firefox 31 及以上版本,IE 10 及以上版本)。示例代码:<!doctype html> <html> <head> <meta charset=...
使用以下命令从db_dump.sql文件插入my_users表: $ mysql -u my_user -pmy_password my_db_name < db_dump.sql 使用或类的代码在本地托管代码。 导航到浏览器中的bad-inj.php页面,然后处理表单。 以下是...
var db *sql.DB db.QueryRow(` select xxx ,xxx ,xxx , case when xxx is null then xxx else true end as xxx from xxx as xxx join xxx on xxx = xxx join xxx as xxx on xxx = xxx left outer joi
这是带有Orientdb的CRUD的示例创建数据库:db / prueba.sql 安装依赖项: npm安装运行测试: npm测试
mysql官方给的4个数据库脚本: menagerie-db.zip sakila-db.zip world.sql.zip world_innodb.sql.zip 创建数据库脚本示例.sql 这个...mysql -uroot -proot -P3307 -Dworld< E:\tmp\mysql_example_db\world_innodb.sql
OLEDB providers can run in-process or out of process. When running out of process, they run under the context of DLLHOST.EXE. Memory Leak To reserve or commit memory and unintentionally not release ...
下面的例子: java -jar target/ms-sqlserver-jdbc-1.0.jar "jdbc:sqlserver://mydatabase.db.windows.net:1433;database=My_Example_DB;user=user@example.com;password=secret123;encrypt=true;...
ch4\Example_4_1~ Example_4_4 ---- 第4章中的连接到SQL Server数据库、使用ODBC连接数据源、使用OLEDB连接数据源、链接到Oracle数据库; ch5\Example_5_1~ Example_5_4 ---- 第5章中的使用ADO.NET操作数据库; ch6\...
ch4\Example_4_1~ Example_4_4 ---- 第4章中的连接到SQL Server数据库、使用ODBC连接数据源、使用OLEDB连接数据源、链接到Oracle数据库; ch5\Example_5_1~ Example_5_4 ---- 第5章中的使用ADO.NET操作数据库; ch6\...
环回示例用户组织 这是一个演示应用程序,用于展示如何使用关联的组织自定义用户模型。 楷模: Org:组织模型 名称:字符串 orgUsers: hasMany 与 OrgUser 的关系(将Org.name映射到OrgUser.realm ...
支持范例文件管理(SQL Example Manager) 支持拖放数据库加载(DragDrop Database) 结果输出(Export to CSV/XML/TXT) 多国语言显示(Multiple Language): 预设中英文,并可自行扩充 结果打印(Print ...
*dbext* *dbext.vim* *db_ext* *db_ext.vim* *database-extension* *pgsql* *mysql* *asa* *ase* *ingres* *interbase* *sqlite* *sqlsrv* *ora* *db2* 1. Overview |dbext-overview| 2. Installation |...