Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Math equation needed to solve SQL problem

Math equation needed to solve SQL problem

From: <mrs_gleeson_at_my-deja.com>
Date: Thu, 04 Nov 1999 16:42:52 GMT
Message-ID: <7vsd2b$vrn$1@nnrp1.deja.com>


Hi,
I have a user entered date range (from, to). Lets say (08/01/1999- 08/31/1999)
In the table I have record w/ unkown differnet dates. I need to pick the dates from the table that if I keep adding 3 years to them, they end up in the above date range.

Example:
the table_date (08/10/1993) if I keep adding 3 years to it, it will end in the range
(08/10/1993 + 3 yrs = 08/10/1996). Add another 3 yrs
(08/10/1996 + 3 yrs = 08/10/1996). Add another 3 yrs = (08/10/1996 + 3
yrs = 08/10/1999) which is in the range (08/01/1999- 08/31/1999).

2ND Example:
the table_date (02/01/1994 + 3 yrs = 02/01/1997). Add another 3 yrs
(02/01/1997 + 3 yrs = 02/01/2000) which is not in the range
(08/01/1999- 08/31/1999).

Please help! I need a math wizard to give me ONE select statement that contains a mathematical equation. Maybe there is a way in Oracle's function that can tell me if the table_date is between the date range or not????
Thanks in advance.
--MS.Gleeson

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 04 1999 - 10:42:52 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US