Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Inconsistent results with Julien dates using OpenQuery

user10223898Sep 22 2015 — edited Sep 22 2015

We have an MS SQL Server using Oracle via a Linked Server using the OleDb driver.

When I execute the following query from MS SQL Server:

select * from OPENQUERY(GMENU, 'select to_char(to_date(''01-JAN-2015'') ,''J'') from dual')

I get: 1721443

When I execute this query in Oracle: select to_char(to_date('01-JAN-2015') ,'J') from dual

I get: 2457024

Can someone explain how I can get consistent results? Specifically, I'm trying to run queries that use dates in the where clause and it seems the only way to do that is using Julien dates. I had it working once before, but now it's acting glitchy because the results are inconsistent.

This post has been answered by unknown-951199 on Sep 22 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 20 2015
Added on Sep 22 2015
3 comments
421 views