您的当前位置:首页正文

求个高效的sqlserver连oracle的方法

2020-11-09 来源:汇智旅游网

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

显示全文