Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is there any point in using this NVL?

TomJan 18 2011 — edited Jan 20 2011
Found the below SQL in a code. Isn't the outer NVL unnecessary?
select nvl(sum(nvl(order_value_n,0)), 0)
		into v_ord_value
		from order_dtl
		where year_code_c = iv_year_code
		and order_id_c = iv_ord_id
		and po_element_c = iv_po_code;
		
		exception when no_data_found then v_ord_value := 0;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 17 2011
Added on Jan 18 2011
14 comments
5,115 views