Re: date functions

From: andrewst <member14183_at_dbforums.com>
Date: Tue, 24 Jun 2003 12:47:07 +0000
Message-ID: <3037242.1056458827_at_dbforums.com>


Originally posted by Macius The Great
> thanx Guido but in fact price can start loong before may and
> end looong
> after may it menas that it is affective in may but we cant find
> it when we
> lookig for ' 05'
Sounds like you want to find all prices that OVERLAP with May. The best way to write that is:

WHERE effective_start_date <= TO_DATE('31-MAY-2003') AND effective_end_date >= TO_DATE('01-MAY-2003')

You will need to add NVLs if either of your dates can be NULL.

--
Posted via http://dbforums.com
Received on Tue Jun 24 2003 - 14:47:07 CEST

Original text of this message