Skip to Main Content

SQL & PL/SQL

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!

Extract parts of a timestamp field using dblink to SQL SERVER

Jose ElvirOct 16 2013 — edited Oct 18 2013

Hi,

I have a dblink that I use to connect to a SQL SERVER database and I need to extract parts of a TImestamp field stored in a table in SQL SERVER and after stored in a table in my ORACLE SERVER

But when I try to extract any part of the date I receive some errors like this:

select * from "XYZ"@SQLDBLINK1 where EXTRACT(YEAR FROM "TimeStamp") = '2013'

ORA-02070: The Database XYZ dont support EXTRACT in this context


select * from "XYZ"@SQLDBLINK1 where DATEPART(yyyy,"TimeStamp") = '2013'

ORA-00904: "DATEPART": Identifier not valid

Any advice

Thanks in advance

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 15 2013
Added on Oct 16 2013
7 comments
1,341 views