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
i think it's not necessary nvl ...
Diana Duncan <Diana_at_fileFRENZY.com> on 26/10/2000 03:21:20 PM
Please respond to ORACLE-L_at_fatcity.com
To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc: (bcc: Marcos Vera/M&S Consultores/51) Subject: 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);
--
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 Liststo: 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 - 14:33:43 CDT
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
![]() |
![]() |