We have an MS SQL Server that has a Linked Server to our Oracle database using OleDb. This generally works pretty well, but we have a lot of issues with date related queries.
One issue I need a solution for is converting dates to Julien dates. If I execute the following on MS SQL Server:
select * from OPENQUERY(ORACLESERVER, 'select to_char(to_date(''01-JAN-2015'') ,''J'') from dual')
I get: 1721443
But if I execute the following in Oracle directly:
select to_char(to_date('01-JAN-2015') ,'J') from dual
I get: 2457024
What's up with that? And how do I fix it so I get the same result