<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: True or False &#8211; NVL</title>
	<atom:link href="http://hoopercharles.wordpress.com/2010/05/11/true-or-false-nvl/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2010/05/11/true-or-false-nvl/</link>
	<description>Miscellaneous Random Oracle Topics: Stop, Think, ... Understand</description>
	<lastBuildDate>Mon, 13 May 2013 14:10:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: NVL-st Du noch oder COALESCE-t Du schon? &#171; Oraculix</title>
		<link>http://hoopercharles.wordpress.com/2010/05/11/true-or-false-nvl/#comment-4473</link>
		<dc:creator><![CDATA[NVL-st Du noch oder COALESCE-t Du schon? &#171; Oraculix]]></dc:creator>
		<pubDate>Tue, 28 Feb 2012 20:51:53 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2046#comment-4473</guid>
		<description><![CDATA[[...] &#8220;True or False &#8211; NVL&#8221;, ein paar schöne Beispiele zu Mißverständnissen bzgl. NVL()  Bewerten:  Diesen Artikel:DruckenFacebookTwitterMehrE-MailDiggRedditStumbleUponLinkedIn [...]]]></description>
		<content:encoded><![CDATA[<p>[...] &#8220;True or False &#8211; NVL&#8221;, ein paar schöne Beispiele zu Mißverständnissen bzgl. NVL()  Bewerten:  Diesen Artikel:DruckenFacebookTwitterMehrE-MailDiggRedditStumbleUponLinkedIn [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/05/11/true-or-false-nvl/#comment-978</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Mon, 17 May 2010 14:27:31 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2046#comment-978</guid>
		<description><![CDATA[At its core, for that website (and most commercial websites), it is a business decision that determines what is posted, what is error checked, what is periodically reviewed, what is corrected, and how frequently the pages are cross-linked from domains owned by the same company.

The cross-linking drives the pages further up the Google search results, which means that someone trying to learn how something works will *probably* view the web pages that were cross-linked, and will possibly leave the person to quickly learn that Oracle Database is probably an impossibly difficult to learn platform.  Oracle Database is not an impossibly difficult to learn platform.

---

At its core, in case the message is not clear, this blog website has a simple message: &quot;Stop, think, understand.&quot;  Not everything examined needs to be true for that to happen, but it is important to determine methods to detect when something cannot possibly be true, and verify that what is true will also not only be true in the specific release of Oracle that is in use, but also in past and future releases.

*Enough said on the topic, I think*]]></description>
		<content:encoded><![CDATA[<p>At its core, for that website (and most commercial websites), it is a business decision that determines what is posted, what is error checked, what is periodically reviewed, what is corrected, and how frequently the pages are cross-linked from domains owned by the same company.</p>
<p>The cross-linking drives the pages further up the Google search results, which means that someone trying to learn how something works will *probably* view the web pages that were cross-linked, and will possibly leave the person to quickly learn that Oracle Database is probably an impossibly difficult to learn platform.  Oracle Database is not an impossibly difficult to learn platform.</p>
<p>&#8212;</p>
<p>At its core, in case the message is not clear, this blog website has a simple message: &#8220;Stop, think, understand.&#8221;  Not everything examined needs to be true for that to happen, but it is important to determine methods to detect when something cannot possibly be true, and verify that what is true will also not only be true in the specific release of Oracle that is in use, but also in past and future releases.</p>
<p>*Enough said on the topic, I think*</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://hoopercharles.wordpress.com/2010/05/11/true-or-false-nvl/#comment-977</link>
		<dc:creator><![CDATA[Andy]]></dc:creator>
		<pubDate>Mon, 17 May 2010 12:49:57 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2046#comment-977</guid>
		<description><![CDATA[This kind of error seems to be a recurring theme on *that* website .... :)]]></description>
		<content:encoded><![CDATA[<p>This kind of error seems to be a recurring theme on *that* website &#8230;. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/05/11/true-or-false-nvl/#comment-961</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 14 May 2010 11:32:26 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2046#comment-961</guid>
		<description><![CDATA[Martin,

That is a great example that you linked to in your response.  I never considered using DBMS_LOCK.SLEEP to demonstrate the potential difference that the short-circuit evaluation could make in evaluation time.  At first glance it might seem silly to use DBMS_LOCK.SLEEP in the PL/SQL function, but it could be the case in a production application that each of the PL/SQL functions in the NVL() and COALESCE() functions performs a large number of calculations and send several SQL statements to the database.

---

oraculix and Martin, thanks for contributing to this blog article.]]></description>
		<content:encoded><![CDATA[<p>Martin,</p>
<p>That is a great example that you linked to in your response.  I never considered using DBMS_LOCK.SLEEP to demonstrate the potential difference that the short-circuit evaluation could make in evaluation time.  At first glance it might seem silly to use DBMS_LOCK.SLEEP in the PL/SQL function, but it could be the case in a production application that each of the PL/SQL functions in the NVL() and COALESCE() functions performs a large number of calculations and send several SQL statements to the database.</p>
<p>&#8212;</p>
<p>oraculix and Martin, thanks for contributing to this blog article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Preiss</title>
		<link>http://hoopercharles.wordpress.com/2010/05/11/true-or-false-nvl/#comment-958</link>
		<dc:creator><![CDATA[Martin Preiss]]></dc:creator>
		<pubDate>Fri, 14 May 2010 10:22:45 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2046#comment-958</guid>
		<description><![CDATA[Charles,
#4 false; coalesce (and case and decode) can use a short circuit evalution (and NVL and NVL2 are not setup for this) - http://triangle-circle-square.blogspot.com/2010/02/short-circuit-evaluations-moving-away.html

(I guess your links would provide the same information)

Regards
MP]]></description>
		<content:encoded><![CDATA[<p>Charles,<br />
#4 false; coalesce (and case and decode) can use a short circuit evalution (and NVL and NVL2 are not setup for this) &#8211; <a href="http://triangle-circle-square.blogspot.com/2010/02/short-circuit-evaluations-moving-away.html" rel="nofollow">http://triangle-circle-square.blogspot.com/2010/02/short-circuit-evaluations-moving-away.html</a></p>
<p>(I guess your links would provide the same information)</p>
<p>Regards<br />
MP</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/05/11/true-or-false-nvl/#comment-940</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Wed, 12 May 2010 17:33:01 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2046#comment-940</guid>
		<description><![CDATA[I think that I was typing up my answer for question #3 while you were posting the answer for question #1.

Nice answer for question #1.  

If I remember correctly, I think that Crystal Reports will *optionally* replace NULL numeric values with a value of 0, and if you bring the query result into a spreadsheet package, such as Excel, the NULL value will be treated as a 0.  But, those special cases do not make the question true.  As you stated, it definitely is not true for SQL.]]></description>
		<content:encoded><![CDATA[<p>I think that I was typing up my answer for question #3 while you were posting the answer for question #1.</p>
<p>Nice answer for question #1.  </p>
<p>If I remember correctly, I think that Crystal Reports will *optionally* replace NULL numeric values with a value of 0, and if you bring the query result into a spreadsheet package, such as Excel, the NULL value will be treated as a 0.  But, those special cases do not make the question true.  As you stated, it definitely is not true for SQL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/05/11/true-or-false-nvl/#comment-938</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Wed, 12 May 2010 17:14:01 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2046#comment-938</guid>
		<description><![CDATA[Time to answer another one of the easy questions.
#3 &quot;The NVL function replaces a NULL column value with any other value.&quot;  False.  Why?  In my previous comment, after I replaced the double quotes ( &quot; ) with single quotes ( &#039; ), the query still failed.  In that example the CURRENT_STATUS column was defined as a NUMBER and the SQL statement attempted to replace the NULL value in that column with a value that was a VARCHAR (string) value.  The replacement value specified in the NVL function must be of the same datatype.]]></description>
		<content:encoded><![CDATA[<p>Time to answer another one of the easy questions.<br />
#3 &#8220;The NVL function replaces a NULL column value with any other value.&#8221;  False.  Why?  In my previous comment, after I replaced the double quotes ( &#8221; ) with single quotes ( &#8216; ), the query still failed.  In that example the CURRENT_STATUS column was defined as a NUMBER and the SQL statement attempted to replace the NULL value in that column with a value that was a VARCHAR (string) value.  The replacement value specified in the NVL function must be of the same datatype.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: oraculix</title>
		<link>http://hoopercharles.wordpress.com/2010/05/11/true-or-false-nvl/#comment-937</link>
		<dc:creator><![CDATA[oraculix]]></dc:creator>
		<pubDate>Wed, 12 May 2010 17:10:36 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2046#comment-937</guid>
		<description><![CDATA[I&#039;ll answer the (imho) even easier question #1: FALSE.
Why? NVL doesn&#039;t replace zeroes, it replaces NULLs. And a division by NULL doesn&#039;t throw an exception, it simply resolves to NULL.

Ah, by the way: #3 can be falsified with your answer to #2. ;-)]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ll answer the (imho) even easier question #1: FALSE.<br />
Why? NVL doesn&#8217;t replace zeroes, it replaces NULLs. And a division by NULL doesn&#8217;t throw an exception, it simply resolves to NULL.</p>
<p>Ah, by the way: #3 can be falsified with your answer to #2. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/05/11/true-or-false-nvl/#comment-905</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Tue, 11 May 2010 23:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=2046#comment-905</guid>
		<description><![CDATA[I will answer the easy question.
#2 False.  Why?
&lt;pre&gt;
CREATE TABLE T1 (CURRENT_STATUS NUMBER);
  
INSERT INTO T1 VALUES(1);
&lt;/pre&gt;

The above SQL created a table with a single row.  Now the test case:
&lt;pre&gt;
SQL&gt; SELECT NVL(CURRENT_STATUS, &quot;Not disclosed&quot;) FROM T1;
SELECT NVL(CURRENT_STATUS, &quot;Not disclosed&quot;) FROM T1
                            *
ERROR at line 1:
ORA-00904: &quot;Not disclosed&quot;: invalid identifier
&lt;/pre&gt;

Well, that did not work.  How about this:
&lt;pre&gt;
SELECT NVL(CURRENT_STATUS, &#039;Not disclosed&#039;) FROM T1;
  
SQL&gt; SELECT NVL(CURRENT_STATUS, &#039;Not disclosed&#039;) FROM T1;
SELECT NVL(CURRENT_STATUS, &#039;Not disclosed&#039;) FROM T1
                           *
ERROR at line 1:
ORA-01722: invalid number
&lt;/pre&gt;

That did not work either.  How could such a simple concept go wrong?  Is it too much to ask that people test that something works before posting it on the Internet, or at least to ask someone to double-check that it works as described?]]></description>
		<content:encoded><![CDATA[<p>I will answer the easy question.<br />
#2 False.  Why?</p>
<pre>
CREATE TABLE T1 (CURRENT_STATUS NUMBER);
  
INSERT INTO T1 VALUES(1);
</pre>
<p>The above SQL created a table with a single row.  Now the test case:</p>
<pre>
SQL&gt; SELECT NVL(CURRENT_STATUS, "Not disclosed") FROM T1;
SELECT NVL(CURRENT_STATUS, "Not disclosed") FROM T1
                            *
ERROR at line 1:
ORA-00904: "Not disclosed": invalid identifier
</pre>
<p>Well, that did not work.  How about this:</p>
<pre>
SELECT NVL(CURRENT_STATUS, 'Not disclosed') FROM T1;
  
SQL&gt; SELECT NVL(CURRENT_STATUS, 'Not disclosed') FROM T1;
SELECT NVL(CURRENT_STATUS, 'Not disclosed') FROM T1
                           *
ERROR at line 1:
ORA-01722: invalid number
</pre>
<p>That did not work either.  How could such a simple concept go wrong?  Is it too much to ask that people test that something works before posting it on the Internet, or at least to ask someone to double-check that it works as described?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
