4

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

enter image description here

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

Wouter
  • 1,829
  • 3
  • 28
  • 34
kinkajou
  • 3,664
  • 25
  • 75
  • 128

1 Answers1

4

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.

Russell Hart
  • 1,842
  • 13
  • 20
  • Well first the openquery makes sure that the sql is executed on the remote server. The issue was with the null-ability. So casting to a new data type, before it is sent to the local server makes the meta data explicit and there is no conflict. – Russell Hart Mar 27 '12 at 17:24