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: nvl question

Re: nvl question

From: P.J. <psran_at_Home.com>
Date: Sat, 30 Jun 2001 12:24:42 GMT
Message-ID: <eyj%6.63507$Mf5.17106160@news3.rdc1.on.home.com>

Try this
select distinct tab1.col1
from tab1
order by tab1.col1 desc

--


------------------------------------
Make Unlimited phone calls from your PC to ANY phone in the World!
http://www.eboom.com/free/
<kazelot_at_thenut.eti.pg.gda.pl> wrote in message
news:Pine.LNX.4.33.0106300936100.2098-100000_at_thenut.eti.pg.gda.pl...

> I want to select values from one column of my table. The values can be
> repeated in the column, and I want them distinct. I want them oredered
> alphabetically.
>
> select distinct tab1.col1
> from tab1
> order by tab1.col
>
>
> My select returns null as the last value and I would like it to be first?
> How should I do this?
>
> I thought about using nvl function here, but I don't know how (it didn't
> allow me to use 'distinct').
>
> For now I came up with the following:
>
> select distinct tab1.col
> where tab1.col is null
>
> union all
>
> select distinct tab1.col
> where tab1.col is not null
>
>
> Any better ideas? Thank in advance,
> kazelot
>
Received on Sat Jun 30 2001 - 07:24:42 CDT

Original text of this message

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