In SQL server, how can I query an Oracle Timestamp column over a Linked server connection?

亡梦爱人 提交于 2019-12-04 03:43:26

问题


The query I have made in oracle does not work with linked server with sql server 2008.

The OLE DB provider "MSDAORA" for linked server "ORACLE" supplied invalid metadata for column "DATETIME_INS". The data type is not supported.

The query:

select * from ORACLE..U_GERAN.CELLSTATS4

What are the modification that must be done to execute the query.


回答1:


Try,

SELECT * 
FROM OPENQUERY(ORACLE, 'select cast(DATETIME_INS as DATE) from U_GERAN.CELLSTATS4')

You can add the other columns to the query once that column works.



来源:https://stackoverflow.com/questions/9869892/in-sql-server-how-can-i-query-an-oracle-timestamp-column-over-a-linked-server-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!