2 Replies Latest reply on Jul 19, 2013 1:11 PM by robleh7

    trunc() replacing datediff from MS SQL Server


      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.