May 20, 2016 at 8:54 pm
I have a linked server connection from SQL SERVER to Oracle.
I am executing below command in Sql server management studio.
select * from OPENQUERY(ORA_SERVERNAME,'select * from ORACLE_VIEW')
I am getting an error
OLE DB provider "OraOLEDB.Oracle" for linked server "ORA_servername" returned message "ORA-01858: a non-numeric character was found where a numeric was expected".
Note: When i am executing "select * from ORACLE_VIEW" in oracle editor it is working fine and also my test connection was successful in the linked server.
Please advise me on this!!
May 23, 2016 at 1:52 am
Check the definition of your view - ORA-01858 occurs when you convert a string or a number to date and you have passed some incorrect values
http://www.orafaq.com/wiki/ORA-01858
Don't think this is an SQL server issue.
May 23, 2016 at 6:27 am
I have to agree with gfoxxy93 on this. This is not a SQL specific error.
Think of it this way. Have you ever run into a metadata / data type conversion error on a SQL Insert statement? Where you accidentally tried to insert a character value into an INT column?
You could do a SELECT on the source data all you wanted without failure, but then when you try to insert the data into the destination, it would still fail on that conversion attempt.
This error is similar. You need to identify the column that the error is complaining about, then search it for the incorrect data to fix it in Oracle. Or you need to change the receiving column in SQL Server to be VARCHAR or something.
EDIT: This may be a metadata error rather than a conversion error, though. So you might want to check those options if you're using SSIS or something.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply