Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Encoding NULLs as sentinels/extents
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 ISNULL) Received on Thu Nov 26 1998 - 03:00:04 CST