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!

Changing NULL Result to Zero in SubQuery ?

zooba72Apr 21 2023

Hi Everyone,

I'm working on a project an having difficulty getting the correct results. I'm using a sub query to get a value, but the values come back NULL and I need to display NULL as zero. I've tried nvl, coalesce, and nullif - nothing seems to work, value continues to return null in SQL developer. Does anyone have any suggestions ? Thank you in advance !

(SELECT nvl(total_capacity, 0) FROM logical where status = 'undiscovered') as Waste

Comments
Post Details
Added on Apr 21 2023
8 comments
8,473 views