<?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: SQL SERVER &#8211; The Self Join &#8211; Inner Join and Outer Join</title>
	<atom:link href="http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 23 May 2013 14:22:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Rohit Rathod</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-478249</link>
		<dc:creator><![CDATA[Rohit Rathod]]></dc:creator>
		<pubDate>Sun, 19 May 2013 06:44:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-478249</guid>
		<description><![CDATA[This is really good and it has resolved my issue in a second.]]></description>
		<content:encoded><![CDATA[<p>This is really good and it has resolved my issue in a second.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Uday</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-454875</link>
		<dc:creator><![CDATA[Uday]]></dc:creator>
		<pubDate>Sat, 13 Apr 2013 02:16:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-454875</guid>
		<description><![CDATA[hello all,
I have data in following format

id productID price1 price2 price3
1  100           4.0    null   null
2  100          NULL    8     null
3  100           null    null   12
4  108           18     null   NULL
5  108           null    28    null
6  108           null    null   20

However requirement of data is in following data..

id productID price1 price2 price3 IDLIst
1  100             4.0    8      12     1,2,3
4  108             18     28     20     4,5,6

Thanks In Advance]]></description>
		<content:encoded><![CDATA[<p>hello all,<br />
I have data in following format</p>
<p>id productID price1 price2 price3<br />
1  100           4.0    null   null<br />
2  100          NULL    8     null<br />
3  100           null    null   12<br />
4  108           18     null   NULL<br />
5  108           null    28    null<br />
6  108           null    null   20</p>
<p>However requirement of data is in following data..</p>
<p>id productID price1 price2 price3 IDLIst<br />
1  100             4.0    8      12     1,2,3<br />
4  108             18     28     20     4,5,6</p>
<p>Thanks In Advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-450732</link>
		<dc:creator><![CDATA[Tony]]></dc:creator>
		<pubDate>Sat, 06 Apr 2013 10:21:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-450732</guid>
		<description><![CDATA[Clear article with great explanation. It made it easy to understand the differents way to join some table. Thanks.]]></description>
		<content:encoded><![CDATA[<p>Clear article with great explanation. It made it easy to understand the differents way to join some table. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soma Pradhan</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-430205</link>
		<dc:creator><![CDATA[Soma Pradhan]]></dc:creator>
		<pubDate>Sat, 02 Mar 2013 06:33:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-430205</guid>
		<description><![CDATA[Nice explanation. Thx]]></description>
		<content:encoded><![CDATA[<p>Nice explanation. Thx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vamsi</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-416214</link>
		<dc:creator><![CDATA[vamsi]]></dc:creator>
		<pubDate>Fri, 01 Feb 2013 10:09:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-416214</guid>
		<description><![CDATA[excellent nice explination]]></description>
		<content:encoded><![CDATA[<p>excellent nice explination</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kashif</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-415096</link>
		<dc:creator><![CDATA[Kashif]]></dc:creator>
		<pubDate>Wed, 30 Jan 2013 07:46:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-415096</guid>
		<description><![CDATA[My query is as below :


select b.Booking_id,booked_by,Datetime,FP_no,Name,co_name,
   Booking_type,occupation,Nationality,Address,email_id,
   Pan_no,sitting_arrang,state,city,pin_code,Booking_from,Booking_to,
   Venue_type,Type_of_function,Food_Pickup_hour,Food_Pickup_min,Min_people,
   Cost_per_plate,Total,Av_item_total,Grant_amount,Advance,Due,Payment_mode,card_type,
   Card_no,av.av_item,av.av_rate, food.Food_menu 
from Booking_details b, av_details av, booking_food_details food 
where b.Booking_id=@Booking_id 
  and b.Booking_id=av.Booking_id 
  and b.Booking_id=food.Booking_id


Now the problem here is that av_details and booking_food_details have different number of rows,Suppose
booking_food_details has a,b,c and, av_details has d,e,f,g,h

so when I run it with data it shows me 5 lines of entry and av_details rows repeats itself 5 times, like :

booking_food_details                   av_details
       d                                    a
       e                                    b
       f                                    c
       g                                    a
       h                                    b
Rather it should display:

booking_food_details                   av_details
       d                                    a
       e                                    b
       f                                    c
       g                                    
       h]]></description>
		<content:encoded><![CDATA[<p>My query is as below :</p>
<p>select b.Booking_id,booked_by,Datetime,FP_no,Name,co_name,<br />
   Booking_type,occupation,Nationality,Address,email_id,<br />
   Pan_no,sitting_arrang,state,city,pin_code,Booking_from,Booking_to,<br />
   Venue_type,Type_of_function,Food_Pickup_hour,Food_Pickup_min,Min_people,<br />
   Cost_per_plate,Total,Av_item_total,Grant_amount,Advance,Due,Payment_mode,card_type,<br />
   Card_no,av.av_item,av.av_rate, food.Food_menu<br />
from Booking_details b, av_details av, booking_food_details food<br />
where b.Booking_id=@Booking_id<br />
  and b.Booking_id=av.Booking_id<br />
  and b.Booking_id=food.Booking_id</p>
<p>Now the problem here is that av_details and booking_food_details have different number of rows,Suppose<br />
booking_food_details has a,b,c and, av_details has d,e,f,g,h</p>
<p>so when I run it with data it shows me 5 lines of entry and av_details rows repeats itself 5 times, like :</p>
<p>booking_food_details                   av_details<br />
       d                                    a<br />
       e                                    b<br />
       f                                    c<br />
       g                                    a<br />
       h                                    b<br />
Rather it should display:</p>
<p>booking_food_details                   av_details<br />
       d                                    a<br />
       e                                    b<br />
       f                                    c<br />
       g<br />
       h</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: commissary</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-403916</link>
		<dc:creator><![CDATA[commissary]]></dc:creator>
		<pubDate>Sat, 05 Jan 2013 01:48:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-403916</guid>
		<description><![CDATA[select  e1.EmployeeID,e1.name as employeename,e2.ManagerID,isnull(e2.Name,&#039;-HEAD-&#039;) as managername 
from Employee e1   LEFT join Employee e2
on e1.ManagerID=e2.EmployeeID]]></description>
		<content:encoded><![CDATA[<p>select  e1.EmployeeID,e1.name as employeename,e2.ManagerID,isnull(e2.Name,&#8217;-HEAD-&#8217;) as managername<br />
from Employee e1   LEFT join Employee e2<br />
on e1.ManagerID=e2.EmployeeID</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jazz</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-403592</link>
		<dc:creator><![CDATA[jazz]]></dc:creator>
		<pubDate>Fri, 04 Jan 2013 12:25:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-403592</guid>
		<description><![CDATA[thanks]]></description>
		<content:encoded><![CDATA[<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ankush</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-403582</link>
		<dc:creator><![CDATA[Ankush]]></dc:creator>
		<pubDate>Fri, 04 Jan 2013 12:02:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-403582</guid>
		<description><![CDATA[Good One]]></description>
		<content:encoded><![CDATA[<p>Good One</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lokesh ghildiyal</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-395379</link>
		<dc:creator><![CDATA[Lokesh ghildiyal]]></dc:creator>
		<pubDate>Tue, 18 Dec 2012 09:14:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-395379</guid>
		<description><![CDATA[You dont need to use IsNULL when ur using outerjoin
select a1.name as employee, a2.name as ManagerName from employee as a1
left join  employee as a2
on
a1.managerid = a2.employeeid]]></description>
		<content:encoded><![CDATA[<p>You dont need to use IsNULL when ur using outerjoin<br />
select a1.name as employee, a2.name as ManagerName from employee as a1<br />
left join  employee as a2<br />
on<br />
a1.managerid = a2.employeeid</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shiva Kumar</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-360152</link>
		<dc:creator><![CDATA[Shiva Kumar]]></dc:creator>
		<pubDate>Mon, 15 Oct 2012 05:41:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-360152</guid>
		<description><![CDATA[shiva                                                                                                                         
 good examples and concept]]></description>
		<content:encoded><![CDATA[<p>shiva<br />
 good examples and concept</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dushyant</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-337905</link>
		<dc:creator><![CDATA[dushyant]]></dc:creator>
		<pubDate>Mon, 27 Aug 2012 10:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-337905</guid>
		<description><![CDATA[Very Good Concept Sir.]]></description>
		<content:encoded><![CDATA[<p>Very Good Concept Sir.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ketan Barasara</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-334667</link>
		<dc:creator><![CDATA[Ketan Barasara]]></dc:creator>
		<pubDate>Tue, 21 Aug 2012 05:15:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-334667</guid>
		<description><![CDATA[TY]]></description>
		<content:encoded><![CDATA[<p>TY</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sultan Ibrahim</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-318474</link>
		<dc:creator><![CDATA[Sultan Ibrahim]]></dc:creator>
		<pubDate>Tue, 24 Jul 2012 17:16:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-318474</guid>
		<description><![CDATA[Very good explanation with examples in a nutshell.]]></description>
		<content:encoded><![CDATA[<p>Very good explanation with examples in a nutshell.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Girish Shinde</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-311805</link>
		<dc:creator><![CDATA[Girish Shinde]]></dc:creator>
		<pubDate>Tue, 10 Jul 2012 12:54:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-311805</guid>
		<description><![CDATA[dude u rockssssss....nice example...]]></description>
		<content:encoded><![CDATA[<p>dude u rockssssss&#8230;.nice example&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NIKHIL</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-310142</link>
		<dc:creator><![CDATA[NIKHIL]]></dc:creator>
		<pubDate>Fri, 06 Jul 2012 11:10:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-310142</guid>
		<description><![CDATA[I HAVENT TRIED IT BUT I FEEL WE CAN USE CROSS JOIN HERE]]></description>
		<content:encoded><![CDATA[<p>I HAVENT TRIED IT BUT I FEEL WE CAN USE CROSS JOIN HERE</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NIKHIL</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-310141</link>
		<dc:creator><![CDATA[NIKHIL]]></dc:creator>
		<pubDate>Fri, 06 Jul 2012 11:09:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-310141</guid>
		<description><![CDATA[CREATE VIEW (ID,NAME,PNO,ADD) AS SELECT A.ID,A.NAME,B.PNO,B.ADD
FROM TABL E A JOIN TABLE B]]></description>
		<content:encoded><![CDATA[<p>CREATE VIEW (ID,NAME,PNO,ADD) AS SELECT A.ID,A.NAME,B.PNO,B.ADD<br />
FROM TABL E A JOIN TABLE B</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NIKHIL</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-310138</link>
		<dc:creator><![CDATA[NIKHIL]]></dc:creator>
		<pubDate>Fri, 06 Jul 2012 11:05:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-310138</guid>
		<description><![CDATA[USE CROSS JOIN ( CARTESIAN JOIN)]]></description>
		<content:encoded><![CDATA[<p>USE CROSS JOIN ( CARTESIAN JOIN)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SJ</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-262847</link>
		<dc:creator><![CDATA[SJ]]></dc:creator>
		<pubDate>Wed, 14 Mar 2012 08:56:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-262847</guid>
		<description><![CDATA[Thanks nice explanation]]></description>
		<content:encoded><![CDATA[<p>Thanks nice explanation</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karthik</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-254898</link>
		<dc:creator><![CDATA[Karthik]]></dc:creator>
		<pubDate>Tue, 21 Feb 2012 16:23:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-254898</guid>
		<description><![CDATA[Hi,

I want to know what is the impact of INNER JOIN with OUTER JOIN / OUTER APPLY. Also need to know the impact of adding the inner join inside the outer apply instead of using it outside the outer apply

select few_columns
from table1 a
left outer join table2 b
 on b.col1 = a.col1
inner join table3 c
 on c.col2 = b.col2

or

select few_columns
from table1 a
outer apply
(select col1, col2, col3
from table2 b
where b.col1 = a.col1
)z
inner join table3 c
 on c.col2 = z.col2

or

select few_columns
from table1 a
outer apply
(select col1, col2, col3
from table2 b
inner join table3 c
 on c.col2 = b.col2
where b.col1 = a.col1
)z

Please let me know the difference in the performance &amp; the resultset]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I want to know what is the impact of INNER JOIN with OUTER JOIN / OUTER APPLY. Also need to know the impact of adding the inner join inside the outer apply instead of using it outside the outer apply</p>
<p>select few_columns<br />
from table1 a<br />
left outer join table2 b<br />
 on b.col1 = a.col1<br />
inner join table3 c<br />
 on c.col2 = b.col2</p>
<p>or</p>
<p>select few_columns<br />
from table1 a<br />
outer apply<br />
(select col1, col2, col3<br />
from table2 b<br />
where b.col1 = a.col1<br />
)z<br />
inner join table3 c<br />
 on c.col2 = z.col2</p>
<p>or</p>
<p>select few_columns<br />
from table1 a<br />
outer apply<br />
(select col1, col2, col3<br />
from table2 b<br />
inner join table3 c<br />
 on c.col2 = b.col2<br />
where b.col1 = a.col1<br />
)z</p>
<p>Please let me know the difference in the performance &amp; the resultset</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: seleman</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-235307</link>
		<dc:creator><![CDATA[seleman]]></dc:creator>
		<pubDate>Wed, 11 Jan 2012 14:12:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-235307</guid>
		<description><![CDATA[how can i change product category and product subcategory and product tables into one parent child table using select statement is there a way to do these]]></description>
		<content:encoded><![CDATA[<p>how can i change product category and product subcategory and product tables into one parent child table using select statement is there a way to do these</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shrikant</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-231139</link>
		<dc:creator><![CDATA[Shrikant]]></dc:creator>
		<pubDate>Wed, 04 Jan 2012 09:18:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-231139</guid>
		<description><![CDATA[Hey Sanjay.............

Write query as Select * from tabel1,tabel2

U&#039;ll get the result]]></description>
		<content:encoded><![CDATA[<p>Hey Sanjay&#8230;&#8230;&#8230;&#8230;.</p>
<p>Write query as Select * from tabel1,tabel2</p>
<p>U&#8217;ll get the result</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sirisha</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-208552</link>
		<dc:creator><![CDATA[sirisha]]></dc:creator>
		<pubDate>Thu, 01 Dec 2011 09:48:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-208552</guid>
		<description><![CDATA[good]]></description>
		<content:encoded><![CDATA[<p>good</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Puzzle to Win Print Book &#8211; Write T-SQL Self Join Without Using LEAD and LAG &#171; Journey to SQLAuthority</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-196830</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Puzzle to Win Print Book &#8211; Write T-SQL Self Join Without Using LEAD and LAG &#171; Journey to SQLAuthority]]></dc:creator>
		<pubDate>Wed, 16 Nov 2011 12:04:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-196830</guid>
		<description><![CDATA[[...] Self Join [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Self Join [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raghav</title>
		<link>http://blog.sqlauthority.com/2010/07/08/sql-server-the-self-join-inner-join-and-outer-join/#comment-191616</link>
		<dc:creator><![CDATA[Raghav]]></dc:creator>
		<pubDate>Wed, 09 Nov 2011 14:29:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=9488#comment-191616</guid>
		<description><![CDATA[Great Explanation. Thanks for such a good one :)]]></description>
		<content:encoded><![CDATA[<p>Great Explanation. Thanks for such a good one :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
