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 -> Encoding NULLs as sentinels/extents

Encoding NULLs as sentinels/extents

From: Lachlan Pitts <PittsLR_at_housing.pwh.qld.gov.au>
Date: Thu, 26 Nov 1998 19:00:04 +1000
Message-ID: <73j5ao$63r$1@ash.prod.housing.qld.gov.au>


Hi gurus,

    Through dim distant memory, I seem to recall being warned at uni never to encode a null in a field as a value.... strangely enough, on my current project we have a huge number of date range fields that are, (you guessed it!), currently encoding NULLs as "infinity" (ie. from here till eternity). Hence to find those records that were / are / will be current for a specific date we have to do something like.....

SELECT     *
FROM         HISTORY_TABLE  H
WHERE     <PARAM_DATE> >= H.DATERANGE_START
AND            (( <PARAM_DATE> <= H.DATERANGE_END OR H.DATERANGE_END IS
NULL) Received on Thu Nov 26 1998 - 03:00:04 CST

Original text of this message

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