Update 和 Select 结合使用,导入外部服务器的数据
2011-11-28 09:42
232 查看
/* -- 首先启用 Ad Hoc Distributed Queries :--
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
GO
*/
Update a
Set a.Uid = b.Uid, a.IsRent=b.isRent
From louRoom as a, openDataSource('SqlOledb', 'server=192.168.1.0; uid=sa; pwd=123456;').cyyDB.dbo.louRoomas
b
Where
a.id = b.id
/* -- 使用完成后,关闭Ad Hoc Distributed Queries:--
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure
GO
*/
---- 读取Excel格式文件的方法----
Select *
From OpenDataSource
(
'Microsoft.Jet.OLEDB.4.0',
'Excel 8.0; IMEX=1; Database=E:\test.xls'
)...[标签1$]
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
GO
*/
Update a
Set a.Uid = b.Uid, a.IsRent=b.isRent
From louRoom as a, openDataSource('SqlOledb', 'server=192.168.1.0; uid=sa; pwd=123456;').cyyDB.dbo.louRoomas
b
Where
a.id = b.id
/* -- 使用完成后,关闭Ad Hoc Distributed Queries:--
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure
GO
*/
---- 读取Excel格式文件的方法----
Select *
From OpenDataSource
(
'Microsoft.Jet.OLEDB.4.0',
'Excel 8.0; IMEX=1; Database=E:\test.xls'
)...[标签1$]
相关文章推荐
- A SELECT statement that assigns a value to a variable must ... (向变量赋值的 SELECT 语句不能与数据检索操作结合使用 )
- 使用 链接服务器执行SELECT、UPDATE、INSERT 或 DELETE 及其它命令
- Mysql 一条SQL语句实现批量更新数据,update结合case、when和then的使用案例
- PL/SQL编辑数据"这些查询结果不可更新,请包括ROWID或使用SELECT...FOR UPDATE获得可更新结果"处理
- (转)PL/SQL编辑数据"这些查询结果不可更新,请包括ROWID或使用SELECT...FOR UPDATE获得可更新结果"处理
- 使用python将mysql数据导入excel-select into outfile
- Java 使用poi导入excel,结合xml文件进行数据验证的例子
- Java 使用poi导入excel,结合xml文件进行数据验证的例子(增加了jar包)
- 【转】PL/SQL编辑数据"这些查询结果不可更新,请包括ROWID或使用SELECT...FOR UPDATE获得可更新结果"处理
- Mysql 一条SQL语句实现批量更新数据,update结合case、when和then的使用案例
- Oracle编辑数据时提示:这些查询结果不可更新,请使用ROWI或者SELECT……FOR UPDATE获得可更新结果
- Oracle 使用SQL Loader 从外部导入数据
- Java 使用poi导入excel,结合xml文件进行数据验证的例子(增加了jar包)
- mysql中update和select结合使用
- Oracle编辑数据时提示:这些查询结果不可更新,请使用ROWI或者SELECT……FOR UPDATE获得可更新结果。
- SQL中Update...Select...的使用,关联查询后进行更新数据
- Mysql 一条SQL语句实现批量更新数据,update结合case、when和then的使用案例
- 在MyBatis的select、insert、update、delete这些元素中都提到了parameterType这个属性。MyBatis现在可以使用的parameterType有基本数据类型和Ja
- MYSQL-update与select结合使用
- 使用 链接服务器执行SELECT、UPDATE、INSERT 或 DELETE 及其它命令