Skip to Main Content

Database Software

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!

trunc() replacing datediff from MS SQL Server

robleh7Jul 18 2013 — edited Jul 19 2013

I've been able to successfully replace the MS SQL func datediff with Oracle's trunc() for a dB at my firm. Now a slight problem occurs when I try to tweek it. Here is the generic code w/o any company references (my firm is very strict about leaking proprietary info).

SELECT createdate, TransactionDtTm, id, objid,

trunc((createdate- start_date) <=0))

FROM TBL1, TBL2

where active =1;

This query runs fine w/o the <=0. With this parameter added I get an ORA 00907 error. But I do have closing parenthesis.

Any suggestions would be appreciated.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 16 2013
Added on Jul 18 2013
2 comments
2,301 views