[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: months_between.
- Subject: Re: months_between.
- From: the dragon <ceprn@HOTMAIL.COM>
- Date: Tue, 2 Nov 1999 16:38:57 CST
What database are you using???? If you are using Oracle, you can use the
between fcn...
psuedo-code:
where ever the prompt happens; where #No_of_Month_Input is input/defined
set $start_date = sysdate - #No_of_Month_Input
and in your select
...
EFFDT,
...
from
....
where
...
and effdt between $start_date and sysdate (or $end_date)
If you aren't using Oracle, and your psuedo-database doesn't allow the
between fcn, get a real database (Oracle) :-) heheheheh
HTH
clark 'the dragon' willis
dragon enterprises, consulting services
----Original Message Follows----
What version of SQR do you have?
In 4 you can do
let #months = datediff(datenow(), &EFFDT, 'month')
--
Cherno.
>>> Nhat-Ha Duong <nhat-ha.p.duong@BELLATLANTIC.COM> 11/02 5:38 PM >>>
Is there a similar function to MONTHS_BETWEEN in SQR? Here is what I
tried to
do:
select
...
EFFDT,
...
from
....
where
...
and MONTHS_BETWEENS(CURRENT DATE, &EFFDT) <= #No_of_Month_Input
Thanks,
Nhat-Ha
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com