Home > Database > Mysql Tutorial > 求个高效的sqlserver连oracle的方法

求个高效的sqlserver连oracle的方法

WBOY
Release: 2016-06-07 15:39:34
Original
1131 people have browsed it

采用导入函数变一下可快很多,只是时间函数怎么导不知。希望有人指。本方案是引用网上的非我之功 DECLARE @Sql VARCHAR( 1000 ) DECLARE @organizationID VARCHAR( 10 ) SELECT @organizationID = (SELECT ORGANIZATION_ID FROM MYORGS WHERE ORGANIZATION_NA

采用导入函数变一下可快很多,只是时间函数怎么导不知。希望有人指。本方案是引用网上的非我之功

DECLARE @Sql VARCHAR(1000)
DECLARE @organizationID VARCHAR(10)
SELECT @organizationID = (SELECT ORGANIZATION_ID FROM MYORGS WHERE ORGANIZATION_NAME = 'MMT')
SET @Sql = 'SELECT * from 表名 where organization_id ='+@organizationID
SET @Sql = 'SELECT * FROM OPENQUERY(数据库名, ''' + REPLACE(@Sql, '''', '''''') + ''')'
EXEC(@Sql)

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template