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!

Unable to retrieve a record containing NULL value

buggleboy007Jul 22 2020 — edited Jul 22 2020

I am unable to retrieve a record from a table that contains NULL value despite me put the condition correctly.

For example, I am using the query below:

SELECT * FROM barcode B

WHERE B.business_unit_id = 65

AND B.style_id = 'GD5569'

--and NVL(b.dimension_id,'n/a') = 'n/a';-- IS NULL;

AND B.dimension_id IS NULL;

In case I do not use NULL then the following records are obtained and I am interested in the 2 records displayed in the figure below:.

Is there anything that I am doing incorrectly here?

pastedImage_5.png

This post has been answered by Tubby on Jul 22 2020
Jump to Answer
Comments
Post Details
Added on Jul 22 2020
4 comments
2,362 views