Order By not correct when using data returned by NVL statement

From: Andrew Emanuel <freeside_at_clara.net>
Date: Tue, 12 Dec 2000 20:28:00 -0000
Message-ID: <8UvZ5.42359$R77.3445408_at_nnrp4.clara.net>


[Quoted] I have a query which selects three fields, one of which (a date) has an NVL [Quoted] statement to default the value to a specified date if null. The problem [Quoted] that I have is that the results of the query are ordered by the date with [Quoted] the NVL statement, but the result is displayed as though the NVL statement [Quoted] was not used.

The rows returned are ordered by the date where the date actually contains a [Quoted] value, but the rows where the date is null are placed at the top even though [Quoted] the value that is given to the date should appear lower down (that is they [Quoted] are treated as if the date is still null).

This query worked correctly under SQL 7.3.4. The problem occurs with SQL [Quoted] 8.1.5.

I have placed the NVL statement in the order by clause to no avail.

Any ideas? Received on Tue Dec 12 2000 - 21:28:00 CET

Original text of this message