Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Why this update is not working , can't I use nvl function in
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
![]() |
![]() |