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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Why this update is not working , can't I use nvl function in

Re: Why this update is not working , can't I use nvl function in

From: Veera Prasad <vprasad_at_olf.com>
Date: Thu, 26 Oct 2000 16:18:54 -0400
Message-Id: <10661.120345@fatcity.com>


Tried the way you said , but still no luck , not sure why!

Diana Duncan wrote:

> Why not put the nvl into the select portion instead of around it?
>
> Instead of
> update <table1>
> set max_capacity = nvl( (select max (col1) from <table2>
> where <table2>.col1 = <table1.col1 and
> <table1.col1 in (select col1 from <table3>
> where col2 = 33)), 0.0)
> where <table1>.col1 between v_min_unique_num and (v_min_unique_num +
> v_increment);
>
>
> Do this
>
> update <table1>
> set max_capacity = (select nvl(max (col1),0.0) from <table2>
> where <table2>.col1 = <table1.col1 and
> <table1.col1 in (select col1 from <table3>
> where col2 = 33))
> where <table1>.col1 between v_min_unique_num and (v_min_unique_num +
> v_increment);
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Diana Duncan
> INET: Diana_at_fileFRENZY.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Thu Oct 26 2000 - 15:18:54 CDT

Original text of this message

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