Total Pageviews

2012/05/29

What's difference between an empty string and a null value

Question: What is the difference between an "empty" value and a "null" value? 
Answer: An empty string is treated as a null value in Oracle.

Demo
NIGT013.COLL_B_DATE is null, and apply NVL2 to  substitute a value (i.e. empty string) when a null value is encountered.

But it showed null value in report. It results from an empty string is treated as a null value in Oracle

Therefore, in order to show non-null value in my report. Substitute two spaces when a null value is encountered.

Then it won't show null value in report anymore.

No comments: