Re: NULL Values

From: Brian E Dick <bdick_at_cox.net>
Date: Mon, 27 Jan 2003 21:39:44 GMT
Message-ID: <AGhZ9.38030$GX4.1456249_at_news2.east.cox.net>


Depending on the Oracle version, you could use either CASE..WHEN or DECODE to translate your column to a number and then sort by the number.

"beutler" <webmaster_at_beutler-muenzen.de> wrote in message news:c299fdd.0301271107.75a99693_at_posting.google.com...
> I've problems retrieving a table where the key fields may contain NULL
> VALUES. The first problem is, that Oracle does not seem to distinguish
> between NULL VALUES, Empty Strings or even blank strings (which are
> trimmed to NULL). Isn't there any way to change this behaviour ?
> I want to retrieve the data in logical order, that means for me empty
> fields first. Because Oracle trims empty strings or strings of blanks
> to NULL and by default, returns NULLs last, I tried to use the NULLS
> FIRST clause in my query. But this is very slow, it seams Oracle will
> then no longer use the index if the query constraints via the index
> fields...
> Isn't there any way to retrieve data with empty values first while
> reading using an index ?
Received on Mon Jan 27 2003 - 22:39:44 CET

Original text of this message