Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Order By Clause-MS to Oracle Conversion

Re: Order By Clause-MS to Oracle Conversion

From: Marc Billiet <E.Mail_at_address.com>
Date: Thu, 24 Aug 2000 07:47:44 +0200
Message-ID: <8o2d4r$954$1@vkhdsu24.hda.hydro.com>

You can try something like (replace nullcolumn by the name of your column):

select *
from table
order by nvl(nullcolumn, chr(0))

Note that if you have two rows where the column is null, the order of these two rows can still differ.

Marc

afedirko_at_my-deja.com wrote in message <8o165a$5n4$1_at_nnrp1.deja.com>...
>When converting a database from MS SQL Server 7 to Oracle 8x, I
>discovered that the Order By Clause behaves differently between the two
>databases. When I do an Order By in SQL Server, a null will appear
>before a field with a character. When in Oracle, it is the opposite.
>
>It is very important to get the same resultset from both databases, as
>the Application can point to either one. Besides placing a space
>character instead of a null, do I have any other option for
>accomplishing this sort in Oracle?
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Thu Aug 24 2000 - 00:47:44 CDT

Original text of this message

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