Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Order By Clause-MS to Oracle Conversion
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