Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: OPENROWSET using ORACLE and DATEDIFF

Re: OPENROWSET using ORACLE and DATEDIFF

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Mon, 14 Oct 2002 18:52:26 +0200
Message-ID: <hdtlquc9kdasttndjonurpdhvkth5b2kct@4ax.com>


On Mon, 14 Oct 2002 16:22:07 +0100, "Andy" <nospam_at_nospam.com> wrote:

> FROM IGS.EVT_AGENT_ACTIVITY
> WHERE DATEDIFF(''H'',TO_DATE(AA_TIME_STAMP,''yyyy/mm/dd:hh:mi:ss'') ,
>TO_DATE(''2002/10/13:11:00:00'',''yyyy/mm/dd:hh:mi:ss''))<2
> ')

You are mixing Oracle-based function and Microsux functions. You need to either
- rewrite the sql to use Oracle functions only (and run it as a passthrough query)
-or rewrite the sql to use Microsux functions only.

In Oracle the datediff function is not applicable, you just subtract two dates, in Microsux the to_date function doesn't exist.

I would try to prevent using this group as a debugging tool.

Regards

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Mon Oct 14 2002 - 11:52:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US