2012-11-23 124 views
0

我有兩個日期,我想檢查條件,CLO/LO issued date past 14 days grace period fall in the reporting period.我有兩個日期。我試過條件如何計算14天后的日期

LOSA_CR_DETAIL_Z.lo_dt > 14 + (:endDate - :startDate) 

但是這給了我錯誤

ORA-00932: inconsistent datatypes: expected DATE got NUMBER 
00932. 00000 - "inconsistent datatypes: expected %s got %s" 
*Cause:  
*Action: 

我認爲這會給我14天沒有日期。我如何計算date > 14 days plus date

感謝

回答

0

從引進到您的查詢,是聽起來像你想檢查LOSA_CR_DETAIL_Z.lo_dt + 14 day落入特定日期間隔內。

如果是這樣,像

LOSA_CR_DETAIL_Z.lo_dt + 14 BETWEEN :startDate AND :endDate 

應該是你所期待的一個條件。