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: Diana Duncan <Diana_at_fileFRENZY.com>
Date: Thu, 26 Oct 2000 15:17:53 -0400
Message-Id: <10661.120332@fatcity.com>


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); Received on Thu Oct 26 2000 - 14:17:53 CDT

Original text of this message

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