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

Home -> Community -> Usenet -> c.d.o.misc -> Re: nvl /min function question

Re: nvl /min function question

From: Andrey Roslyakov <andrey-roslyakov_at_worldnet.att.net>
Date: Tue, 23 Jun 1998 23:13:58 -0400
Message-ID: <6mpqtn$6pv@bgtnsc03.worldnet.att.net>


Iancrozier wrote:
>
> I have been trying to run a PL/SQL program where I am looking for a minimum
> value of a column in a table which is greater than a certain other value. In
> some cases I get a null value, so I would like to use nvl to change the null
> values to the same constant. So, my question, is it possible to "wrap" the nvl
> function around the min function. I have tried to use something like
> select nvl(min(A),99999) into v_A from TABLE where A > B;
>
> but that doesn't work. What should I do instead?
>
> TIA

Aggregate functions do not take NULL in account,but if You want to,then min(nvl(a,99999))

Andre. Received on Tue Jun 23 1998 - 22:13:58 CDT

Original text of this message

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