<?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/"
		>
<channel>
	<title>Comments on: SQL CASE statement with NULLs</title>
	<atom:link href="http://www.stillnetstudios.com/mssql-case-statement-with-nulls/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stillnetstudios.com/mssql-case-statement-with-nulls/</link>
	<description>Web development notes and commentary from Ryan Stille</description>
	<lastBuildDate>Fri, 30 Jul 2010 20:41:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Patel Pinakin</title>
		<link>http://www.stillnetstudios.com/mssql-case-statement-with-nulls/comment-page-1/#comment-1249</link>
		<dc:creator>Patel Pinakin</dc:creator>
		<pubDate>Sat, 03 Apr 2010 07:08:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/2008/06/04/mssql-case-statement-with-nulls/#comment-1249</guid>
		<description>was just forgot the syntax,
thanx
u helped me recall...

keep posting...</description>
		<content:encoded><![CDATA[<p>was just forgot the syntax,<br />
thanx<br />
u helped me recall&#8230;</p>
<p>keep posting&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nayha</title>
		<link>http://www.stillnetstudios.com/mssql-case-statement-with-nulls/comment-page-1/#comment-724</link>
		<dc:creator>Nayha</dc:creator>
		<pubDate>Tue, 15 Sep 2009 11:18:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/2008/06/04/mssql-case-statement-with-nulls/#comment-724</guid>
		<description>very helpful. Thanks.</description>
		<content:encoded><![CDATA[<p>very helpful. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mmark</title>
		<link>http://www.stillnetstudios.com/mssql-case-statement-with-nulls/comment-page-1/#comment-382</link>
		<dc:creator>Mmark</dc:creator>
		<pubDate>Thu, 19 Feb 2009 02:39:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/2008/06/04/mssql-case-statement-with-nulls/#comment-382</guid>
		<description>One more thnak you. It was a big helping.</description>
		<content:encoded><![CDATA[<p>One more thnak you. It was a big helping.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.stillnetstudios.com/mssql-case-statement-with-nulls/comment-page-1/#comment-384</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Tue, 09 Dec 2008 17:46:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/2008/06/04/mssql-case-statement-with-nulls/#comment-384</guid>
		<description>Very useful to me as well. I&#039;m glad that I was able to stumble upon this.</description>
		<content:encoded><![CDATA[<p>Very useful to me as well. I&#8217;m glad that I was able to stumble upon this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sanjay</title>
		<link>http://www.stillnetstudios.com/mssql-case-statement-with-nulls/comment-page-1/#comment-383</link>
		<dc:creator>Sanjay</dc:creator>
		<pubDate>Wed, 08 Oct 2008 09:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/2008/06/04/mssql-case-statement-with-nulls/#comment-383</guid>
		<description>Good piece of information.....I had a confusion in writing a CASE statement with NULLS and this article solved that, Thanks</description>
		<content:encoded><![CDATA[<p>Good piece of information&#8230;..I had a confusion in writing a CASE statement with NULLS and this article solved that, Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ciro Theodoro</title>
		<link>http://www.stillnetstudios.com/mssql-case-statement-with-nulls/comment-page-1/#comment-381</link>
		<dc:creator>Ciro Theodoro</dc:creator>
		<pubDate>Fri, 15 Aug 2008 14:48:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/2008/06/04/mssql-case-statement-with-nulls/#comment-381</guid>
		<description>Very usefull. I was facing the same problem when I found this article. Thanks for that ;-)</description>
		<content:encoded><![CDATA[<p>Very usefull. I was facing the same problem when I found this article. Thanks for that <img src='http://www.stillnetstudios.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan G. Switzer, II</title>
		<link>http://www.stillnetstudios.com/mssql-case-statement-with-nulls/comment-page-1/#comment-380</link>
		<dc:creator>Dan G. Switzer, II</dc:creator>
		<pubDate>Thu, 05 Jun 2008 13:50:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.stillnetstudios.com/2008/06/04/mssql-case-statement-with-nulls/#comment-380</guid>
		<description>The reason the first example doesn&#039;t work is because NULL is never equal (=) to another value--even NULL = NULL will return false.

So you in your first example/attempt the code is essentially saying &quot;WHERE price = NULL&quot;, which will always fail. The reason the second example works is because you&#039;re now using the correct expression for testing to see if a value is NULL--which is using the IS operator.

Obviously COALESCE works because if the value *is* NULL, it&#039;s changing the value to 0.</description>
		<content:encoded><![CDATA[<p>The reason the first example doesn&#8217;t work is because NULL is never equal (=) to another value&#8211;even NULL = NULL will return false.</p>
<p>So you in your first example/attempt the code is essentially saying &#8220;WHERE price = NULL&#8221;, which will always fail. The reason the second example works is because you&#8217;re now using the correct expression for testing to see if a value is NULL&#8211;which is using the IS operator.</p>
<p>Obviously COALESCE works because if the value *is* NULL, it&#8217;s changing the value to 0.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
