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.

5
  • Would have been nice to have the query and the table concerned. Commented Mar 26, 2012 at 9:47
  • Did you read this? Commented Mar 26, 2012 at 9:49
  • @Lieven This is remote server can't modify or alter the table Commented Mar 26, 2012 at 10:05
  • @DavidBrabant edited to include query and table screenshot as I can't see the structure Commented Mar 26, 2012 at 10:09
  • @Kitex - You could verify if what is described applies to you. If it does, you are unfortunatly out of luck if you can't modify the table as This behavior is by design. Commented Mar 26, 2012 at 10:19

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.