View previous topic :: View next topic |
Author |
Message |
cappertan Beginner
Joined: 20 May 2003 Posts: 15 Topics: 10
|
Posted: Wed Jan 25, 2006 11:17 am Post subject: SQL Help for finding a date + nn days |
|
|
Hi:
After reading posts, I am still confused. I think I am close but do not have the syntax right. *** My goal is to find all date greater than that date + 84 days. Beg_dt are dates in my test database.
WHERE A.id = '1234'
AND A.RANGE IN ('V24.2', 'V72.31')
AND B.BEG_DT > ('2004-08-01' + 84 DAYS)
Eventually, in cobol/easytrieve I want replace that hardcoded date with a host variable (:INDATE).
Thanks for your suggestions. _________________ Capp |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed Jan 25, 2006 11:54 am Post subject: |
|
|
cappertan,
Try this
Code: |
WHERE A.id = '1234'
AND A.RANGE IN ('V24.2', 'V72.31')
AND B.BEG_DT > DATE(:IN-DATE) + 84 DAYS
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|