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

求个高效的sqlserver连oracle的方法

WBOY
WBOYOriginal
2016-06-07 15:39:341132browse

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

 

Statement:
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