<?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: Are you there, 2? It&#8217;s me, Erik: Testing for Existance of Values in a Set</title>
	<atom:link href="http://kire.notneb.net/archives/67/feed" rel="self" type="application/rss+xml" />
	<link>http://kire.notneb.net/archives/67</link>
	<description>On the bleeding edge of yesterday.</description>
	<lastBuildDate>Wed, 07 Dec 2011 21:31:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Erik</title>
		<link>http://kire.notneb.net/archives/67/comment-page-1#comment-57</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Wed, 07 Dec 2011 21:31:23 +0000</pubDate>
		<guid isPermaLink="false">http://kire.notneb.net/?p=67#comment-57</guid>
		<description>Thanks for writing. You are correct that you can use an IN clause to determine if a value is in a set, but if you look closely you&#039;ll notice that this technique actually returns all distinct entries, and indicates the aggregate numer of times it appears with the subsequent values defined in the MAX(.. IN ()) clause. This is great if you want to get the entire list of entries back, but summarized by the occurrence of a second value defined in the IN statement even if it is not in the set.</description>
		<content:encoded><![CDATA[<p>Thanks for writing. You are correct that you can use an IN clause to determine if a value is in a set, but if you look closely you&#8217;ll notice that this technique actually returns all distinct entries, and indicates the aggregate numer of times it appears with the subsequent values defined in the MAX(.. IN ()) clause. This is great if you want to get the entire list of entries back, but summarized by the occurrence of a second value defined in the IN statement even if it is not in the set.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kernel Panic</title>
		<link>http://kire.notneb.net/archives/67/comment-page-1#comment-56</link>
		<dc:creator>Kernel Panic</dc:creator>
		<pubDate>Wed, 07 Dec 2011 06:06:44 +0000</pubDate>
		<guid isPermaLink="false">http://kire.notneb.net/?p=67#comment-56</guid>
		<description>I realize that this is a very old post, but I happened across it.  Why would you not use your where clause?

select id from test where foo &lt; 3 and foo is not null
or
select id from test where foo is not null and foo in ( 1, 2 )

It is important to know that null is a valid value to test for and that null is neither a number nor a string.

But your solution is an interesting one, one that I will file away for my sql toolkit.</description>
		<content:encoded><![CDATA[<p>I realize that this is a very old post, but I happened across it.  Why would you not use your where clause?</p>
<p>select id from test where foo &lt; 3 and foo is not null<br />
or<br />
select id from test where foo is not null and foo in ( 1, 2 )</p>
<p>It is important to know that null is a valid value to test for and that null is neither a number nor a string.</p>
<p>But your solution is an interesting one, one that I will file away for my sql toolkit.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

