<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How to write a SQL exclusion join</title>
	<link>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/</link>
	<description>Stay curious!</description>
	<pubDate>Sun, 20 Jul 2008 11:27:24 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>By: Travis McPeak</title>
		<link>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-14296</link>
		<author>Travis McPeak</author>
		<pubDate>Fri, 14 Mar 2008 01:56:11 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-14296</guid>
		<description>Very well written and useful!!  Thank you.</description>
		<content:encoded><![CDATA[<p>Very well written and useful!!  Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-14221</link>
		<author>Xaprb</author>
		<pubDate>Sat, 16 Feb 2008 16:48:11 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-14221</guid>
		<description>Steve, the JOIN clauses can be written as WHERE clauses for inner joins, but I prefer to separate them anyway.  It helps me see more clearly which code is there to match rows between tables, and which code is for filtering out rows from the logical result.  (Even though I know that the query optimizer really applies the filters as it performs the join, not after, it makes complicated joins easier for me to write if I pretend it doesn't).</description>
		<content:encoded><![CDATA[<p>Steve, the JOIN clauses can be written as WHERE clauses for inner joins, but I prefer to separate them anyway.  It helps me see more clearly which code is there to match rows between tables, and which code is for filtering out rows from the logical result.  (Even though I know that the query optimizer really applies the filters as it performs the join, not after, it makes complicated joins easier for me to write if I pretend it doesn&#8217;t).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Bussetti</title>
		<link>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-14217</link>
		<author>Steve Bussetti</author>
		<pubDate>Fri, 15 Feb 2008 19:12:57 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-14217</guid>
		<description>Thanks for the article, it helped me a lot because I am MYSTIFIED by joins.

My question is sort of an aside:

The only reason I use joins is for these specific cases, where they offer me the ability to exclude or miss fields.  Conceptually, I think the JOIN syntax makes no sense at all, and is kind of a lame convenience kludge.  I have always naturally used the 'old school' method of comparing tables because that one has a simple standard logic of joining, grouped in the where clause.

My question is, can you explain to me why you (or lots of people) think the JOIN syntax itself is somehow more sensical than the 'old-style' way, because I don't see it.</description>
		<content:encoded><![CDATA[<p>Thanks for the article, it helped me a lot because I am MYSTIFIED by joins.</p>
<p>My question is sort of an aside:</p>
<p>The only reason I use joins is for these specific cases, where they offer me the ability to exclude or miss fields.  Conceptually, I think the JOIN syntax makes no sense at all, and is kind of a lame convenience kludge.  I have always naturally used the &#8216;old school&#8217; method of comparing tables because that one has a simple standard logic of joining, grouped in the where clause.</p>
<p>My question is, can you explain to me why you (or lots of people) think the JOIN syntax itself is somehow more sensical than the &#8216;old-style&#8217; way, because I don&#8217;t see it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Swanhart</title>
		<link>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-14206</link>
		<author>Justin Swanhart</author>
		<pubDate>Fri, 01 Feb 2008 03:28:30 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-14206</guid>
		<description>Well that is odd.  There are supposed to be plus signs between those empty parenthesis.</description>
		<content:encoded><![CDATA[<p>Well that is odd.  There are supposed to be plus signs between those empty parenthesis.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Swanhart</title>
		<link>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-14205</link>
		<author>Justin Swanhart</author>
		<pubDate>Fri, 01 Feb 2008 03:27:17 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-14205</guid>
		<description>Actually, OUTER JOINS were available in many RDBMS packages before SQL92, but the SQL syntax for those joins was non-standard.  Oracle used the weird ( ) operator.  MySQL supported this syntax until 4.0, but it was removed in 4.1 in favor of support only for the SQL standard.

The Oracle 7.3 syntax was:

SELECT *
  FROM t1,
       t2
 WHERE t1.some_id = t2.some_id ( )</description>
		<content:encoded><![CDATA[<p>Actually, OUTER JOINS were available in many RDBMS packages before SQL92, but the SQL syntax for those joins was non-standard.  Oracle used the weird ( ) operator.  MySQL supported this syntax until 4.0, but it was removed in 4.1 in favor of support only for the SQL standard.</p>
<p>The Oracle 7.3 syntax was:</p>
<p>SELECT *<br />
  FROM t1,<br />
       t2<br />
 WHERE t1.some_id = t2.some_id ( )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-14009</link>
		<author>James</author>
		<pubDate>Sun, 09 Dec 2007 12:00:07 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-14009</guid>
		<description>Great article, really helped me shift from using multiple inner join queries for exclusion joins to single left outer joins to accomplish the same thing.</description>
		<content:encoded><![CDATA[<p>Great article, really helped me shift from using multiple inner join queries for exclusion joins to single left outer joins to accomplish the same thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pino</title>
		<link>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-7299</link>
		<author>Pino</author>
		<pubDate>Thu, 17 May 2007 14:09:08 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-7299</guid>
		<description>Great article.
Please add more advanced tricks.
Can't get enough of them. :)</description>
		<content:encoded><![CDATA[<p>Great article.<br />
Please add more advanced tricks.<br />
Can&#8217;t get enough of them. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LKRaider</title>
		<link>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-5466</link>
		<author>LKRaider</author>
		<pubDate>Tue, 03 Apr 2007 14:05:02 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-5466</guid>
		<description>&lt;p&gt;About my previous comment, just to note that it is not a simple case of replacing SELECT for DELETE, but you have to tell DELETE which table to actually remove rows from. As in:

DELETE table1 FROM table1 LEFT OUTER JOIN table2 .... etc&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>About my previous comment, just to note that it is not a simple case of replacing SELECT for DELETE, but you have to tell DELETE which table to actually remove rows from. As in:</p>
<p>DELETE table1 FROM table1 LEFT OUTER JOIN table2 &#8230;. etc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LKRaider</title>
		<link>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-5465</link>
		<author>LKRaider</author>
		<pubDate>Tue, 03 Apr 2007 13:51:27 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-5465</guid>
		<description>&lt;p&gt;Very useful! I was looking for a way to remove rows that had no association anymore, and the LEFT OUTER JOIN you posted is exactly what I needed. thanks!&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Very useful! I was looking for a way to remove rows that had no association anymore, and the LEFT OUTER JOIN you posted is exactly what I needed. thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-4836</link>
		<author>chris</author>
		<pubDate>Tue, 06 Mar 2007 20:19:59 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2005/09/23/how-to-write-a-sql-exclusion-join/#comment-4836</guid>
		<description>&lt;p&gt;Very helpful to exclude rows when combining two tables.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Very helpful to exclude rows when combining two tables.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
