Comments on: The dangerous subtleties of LEFT JOIN and COUNT() in SQL http://www.xaprb.com/blog/2009/04/08/the-dangerous-subtleties-of-left-join-and-count-in-sql/ Stay curious! Fri, 10 May 2013 18:25:19 +0000 hourly 1 http://wordpress.org/?v=3.5.1 By: David http://www.xaprb.com/blog/2009/04/08/the-dangerous-subtleties-of-left-join-and-count-in-sql/#comment-17063 David Fri, 02 Oct 2009 08:29:39 +0000 http://www.xaprb.com/blog/?p=893#comment-17063 I read your article and it’s probably the closest one to my current issue, but it’s not a complete answer for me.

Do you have a forum that you post to where I can get a solution to my SQL count issue? If so I would greatly appreciate your assistance.

]]>
By: Xaprb http://www.xaprb.com/blog/2009/04/08/the-dangerous-subtleties-of-left-join-and-count-in-sql/#comment-16293 Xaprb Mon, 20 Apr 2009 23:56:12 +0000 http://www.xaprb.com/blog/?p=893#comment-16293 Keith, thanks for making my day, I got a good smile out of that one! I am always “signed in” so I forget the things I subject my guests to…

]]>
By: Keith Thomas http://www.xaprb.com/blog/2009/04/08/the-dangerous-subtleties-of-left-join-and-count-in-sql/#comment-16292 Keith Thomas Mon, 20 Apr 2009 23:18:23 +0000 http://www.xaprb.com/blog/?p=893#comment-16292 Thanks for the tips, ‘Pattern Two’ was just what I was looking for when Google found this page for me.

P.S. I almost didn’t enter this comment because I really do not love SQL and did not want to type honk.

]]>
By: Greg Allard http://www.xaprb.com/blog/2009/04/08/the-dangerous-subtleties-of-left-join-and-count-in-sql/#comment-16213 Greg Allard Thu, 09 Apr 2009 15:10:00 +0000 http://www.xaprb.com/blog/?p=893#comment-16213 When I first started writing queries to generate reports I made the left join mistake many times. I finally figured it out when the data from two queries weren’t coming out the same. I also wrote a post about it hoping to keep people from making the same mistake, but there will always be people using left join without fulling understanding it like I was.

]]>
By: Xaprb http://www.xaprb.com/blog/2009/04/08/the-dangerous-subtleties-of-left-join-and-count-in-sql/#comment-16201 Xaprb Wed, 08 Apr 2009 21:00:21 +0000 http://www.xaprb.com/blog/?p=893#comment-16201 In a more complex query (such as you see in the real world), it’s hard to do that. People don’t alias their table names, and there could be 5 tables with 20 columns each. You have to cross-reference the 100 columns to find out what is coming from where.

It’s a perfect thing for a tool to do, of course. But queries that have to have tool support to be written correctly are more costly than those a human can see are correct.

]]>