<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Converting SQL to LINQ, Part 6: Joins (Bill Horst)</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx</link><description>This post assumes you’ve read the previous posts in this series: Converting SQL to LINQ, Part 1: The Basics Converting SQL to LINQ, Part 2: FROM and SELECT Converting SQL to LINQ, Part 3: DISTINCT, WHERE, ORDER BY and Operators Converting SQL to LINQ,</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>MSDN Blog Postings  &amp;raquo; Converting SQL to LINQ, Part 6: Joins (Bill Horst)</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#6926137</link><pubDate>Tue, 01 Jan 2008 02:25:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6926137</guid><dc:creator>MSDN Blog Postings  » Converting SQL to LINQ, Part 6: Joins (Bill Horst)</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://msdnrss.thecoderblogs.com/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst-2/"&gt;http://msdnrss.thecoderblogs.com/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst-2/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Converting SQL to LINQ, Part 6: Joins (Bill Horst)</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#6926768</link><pubDate>Tue, 01 Jan 2008 03:15:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6926768</guid><dc:creator>Bob Beauchemin</dc:creator><description>&lt;p&gt;Does LINQ have anything that emulates FULL OUTER JOIN?&lt;/p&gt;
</description></item><item><title>Aprendiendo LINQ para Visual Basic 2008</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#6934034</link><pubDate>Tue, 01 Jan 2008 13:00:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6934034</guid><dc:creator>Jorge Serrano - MVP Visual Developer - Visual Basic</dc:creator><description>&lt;p&gt;Si quieres aprender LINQ para Visual Basic 2008, quiz&amp;#225;s te interesen los siguientes art&amp;#237;culos que el&lt;/p&gt;
</description></item><item><title>Aprendiendo LINQ para Visual Basic 2008</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#6934035</link><pubDate>Tue, 01 Jan 2008 13:00:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6934035</guid><dc:creator>El blog de Jorge</dc:creator><description>&lt;p&gt;Si quieres aprender LINQ para Visual Basic 2008, quiz&amp;#225;s te interesen los siguientes art&amp;#237;culos que el&lt;/p&gt;
</description></item><item><title>re: Converting SQL to LINQ, Part 6: Joins (Bill Horst)</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#6942966</link><pubDate>Wed, 02 Jan 2008 01:07:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6942966</guid><dc:creator>GMA Bill</dc:creator><description>&lt;p&gt;I have reviewed all your SQL to LINQ blogs. &amp;nbsp;Thank you for those. &amp;nbsp;I look forward to additional topics.&lt;/p&gt;
&lt;p&gt;Back to Part 3 and the WHERE clause example. &amp;nbsp;What if you need to restrict to a &amp;quot;one of&amp;quot; in a list, for example:&lt;/p&gt;
&lt;p&gt;SQL Statement&lt;/p&gt;
&lt;p&gt;SELECT *&lt;/p&gt;
&lt;p&gt;FROM CustomerTable&lt;/p&gt;
&lt;p&gt;WHERE (State In (&amp;quot;WA&amp;quot;,&amp;quot;CO&amp;quot;,&amp;quot;AS&amp;quot;,&amp;quot;SC&amp;quot;,&amp;quot;NC&amp;quot;,&amp;quot;TN&amp;quot;,&amp;quot;VA&amp;quot;,&amp;quot;OR&amp;quot;,&amp;quot;WV&amp;quot;,&amp;quot;FL&amp;quot;,&amp;quot;MA&amp;quot;,&amp;quot;WY&amp;quot;,&amp;quot;GA&amp;quot;,&amp;quot;NH&amp;quot;,&amp;quot;PA&amp;quot;,&amp;quot;IL&amp;quot;,&amp;quot;AL&amp;quot;));&lt;/p&gt;
&lt;p&gt;This uses the &amp;quot;In&amp;quot; functionality of a SQL Where Clause. &amp;nbsp;I do not want to have to do an expression as individual ORs: State = &amp;quot;WA&amp;quot; OR State = &amp;quot;CO&amp;quot; OR State = &amp;quot;AS&amp;quot; OR ....&lt;/p&gt;
&lt;p&gt;A bunch of &amp;quot;ORs&amp;quot; is cumbersome when the list has many members. &amp;nbsp;The only thing I have been able to come up with is to put the states of interest into a collection with the state abbreviation as the key in the collection. &amp;nbsp;Then use the StatesOfInterest.Contains(State) as the boolean expression in the WHERE clause of the LINQ query.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Dim StatesOfInterest As New Collection()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;WA&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;CO&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;AS&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;SC&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;NC&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;TN&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;VA&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;OR&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;WV&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;FL&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;MA&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;WY&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;GA&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;NH&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;PA&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;IL&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;StatesOfInterest.Add(&amp;quot;&amp;quot;, &amp;quot;AL&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Dim CustQuery = From Contact In dsNWind1.CustomerTable _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Where StatesOfInterest.Contains(Contact.State)&lt;/p&gt;
&lt;p&gt;This seems to work, but there is the overhead of creating and populating the StatesOfInterest Collection. &amp;nbsp;Is there an easier way?&lt;/p&gt;
</description></item><item><title>re: Converting SQL to LINQ, Part 6: Joins (Bill Horst)</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#6958490</link><pubDate>Wed, 02 Jan 2008 23:02:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6958490</guid><dc:creator>GMA Bill</dc:creator><description>&lt;p&gt;The following SQL Query was done in VB6 to open an ADODB.Recordset against a connection to an Access Database:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;SQLstr = &amp;quot;SELECT Sections.InitialStateON, Sections.PointID, Points.TypeID, Points.FeedBackID, &amp;quot; &amp;amp; vbCrLf &amp;amp; _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Points.FeedBackDirID, Points.LogicID, Points.Address &amp;quot; &amp;amp; vbCrLf &amp;amp; _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;FROM Points RIGHT JOIN Sections ON Points.PointID = Sections.PointID &amp;quot; &amp;amp; vbCrLf &amp;amp; _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;Where ((Points.TypeID) In (2,3,4,5,6,8,9,11))&amp;quot; &amp;amp; vbCrLf &amp;amp; _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;ORDER BY Sections.OrderNum;&amp;quot;&lt;/p&gt;
&lt;p&gt;This is the LINQ statement that I have tried to convert it to:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim SecDisplayQuery = From DispSectList In ds4DiagramArray.Sections _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Group Join DispPointList In ds4DiagramArray.Points On _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispSectList.PointID Equals DispPointList.PointID _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Into SectDispInfo = Group _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Where DispPointList.TypeID = 2 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList. TypeID = 3 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList. TypeID = 4 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList. TypeID = 5 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList. TypeID = 6 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList. TypeID = 8 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList. TypeID = 9 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList. TypeID = 11 _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Select SectDispInfo.InitialStateON, _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SectDispInfo.PointID, _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SectDispInfo.TypeID, _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SectDispInfo.FeedBackID, _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SectDispInfo.FeedBackDirID, _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SectDispInfo.LogicID, _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SectDispInfo.Address _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Order By SectDispInfo.OrderNum&lt;/p&gt;
&lt;p&gt;I can not get this LINQ to DataSet to be happy any way I have tried. &amp;nbsp;When using the Group Join, Intellisense wants an “Into” clause. &amp;nbsp;I am not clear on what the “Into” clause is for. &amp;nbsp;I am guessing that it is a temporary intermediate object that contains the joined data and could then be &amp;quot;Selected&amp;quot; from as I have tried to do in the “Select” clause. &amp;nbsp;Intellisense &amp;nbsp;recognized the alias “SectDispInfo” when I started the Select Clause, but then did not recognized what I thought would be the data columns. &amp;nbsp;This indicates to me that I am doing something wrong. &amp;nbsp;Also when writing the “Where” clause, intellisense presented me with the alias “DispSectList” but not “DispPointList” that is where the TypeID data is. &amp;nbsp;I must be doing something wrong there too. &amp;nbsp;Help!!!&lt;/p&gt;
&lt;p&gt;ds4DiagramArray is a DataSet created in the DataSet Designer with 2 related tables:&lt;/p&gt;
&lt;p&gt;Table: Sections&lt;/p&gt;
&lt;p&gt;	Column: OrderNum as System.Int32&lt;/p&gt;
&lt;p&gt;	Column: InitialStateON as System.Boolean&lt;/p&gt;
&lt;p&gt;	Column: PointID as System.Int32&lt;/p&gt;
&lt;p&gt;Table: Points&lt;/p&gt;
&lt;p&gt;	Column: PointID as System.Int32&lt;/p&gt;
&lt;p&gt;	Column: TypeID as System.Int32&lt;/p&gt;
&lt;p&gt;	Column: Address as System.String&lt;/p&gt;
&lt;p&gt;	Column: FeedBackID as System.Int32&lt;/p&gt;
&lt;p&gt;	Column: FeedBackDirID as System.Int32&lt;/p&gt;
&lt;p&gt;	Column: LogicID as System.Int32&lt;/p&gt;
&lt;p&gt;The Sections table is a table of points to be displayed by this routine in a given order defined by OrderNum and is related to the Points table through the PointID column.&lt;/p&gt;
&lt;p&gt;This DataSet is populated using ADO.Net DataAdapters from an Access Database. &amp;nbsp;There are a lot more fields in the Access Database in both the Sections Table and the Points Table, but they are not needed for this routine in the project, so the DataAdapters only load a DataSet that is a subset of the DataBase.&lt;/p&gt;
</description></item><item><title>Content Rollup for November and December</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#6980617</link><pubDate>Fri, 04 Jan 2008 19:03:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6980617</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;Here&amp;amp;#39;s a summary of all the content the VB team members, including myself, have created for you on&lt;/p&gt;
</description></item><item><title>re: Converting SQL to LINQ, Part 6: Joins (Bill Horst)</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#7011632</link><pubDate>Mon, 07 Jan 2008 05:08:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7011632</guid><dc:creator>TC</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Will you talk about subquery in the future?&lt;/p&gt;
&lt;p&gt;I want to output OderID, and the LATEST Order status of the order&lt;/p&gt;
&lt;p&gt;Table: Order&lt;/p&gt;
&lt;p&gt;Column: OderID&lt;/p&gt;
&lt;p&gt;Column: OrderDate&lt;/p&gt;
&lt;p&gt;Table: OrderStatus&lt;/p&gt;
&lt;p&gt;Column: OderStatusID&lt;/p&gt;
&lt;p&gt;Column: OrderID&lt;/p&gt;
&lt;p&gt;Column: OrderStatus&lt;/p&gt;
&lt;p&gt;Column: StatusDate&lt;/p&gt;
&lt;p&gt;There is a one to many relationship between Table Order and OrderStatus.&lt;/p&gt;
&lt;p&gt;This can easily be done using subquery, but how to do it in Linq without using stored procedure or user defined function in the database?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: Converting SQL to LINQ, Part 6: Joins (Bill Horst)</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#7031139</link><pubDate>Tue, 08 Jan 2008 21:39:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7031139</guid><dc:creator>Bill Horst</dc:creator><description>&lt;p&gt;Answering all three questions:&lt;/p&gt;
&lt;p&gt;TC - I'm about to put together a post which will discuss subquery. &amp;nbsp;Please see Part 7.&lt;/p&gt;
&lt;p&gt;Bob - The short answer is No, we don't have built-in support for Full Outer Join. &amp;nbsp;There is a way to get the same results as a Full Outer Join, but it is fairly complicated. &amp;nbsp;I'll try and cover FULL OUTER JOIN and LEFT/RIGHT OUTER JOIN more thoroughly in Part 8 (hopefully around the 15th).&lt;/p&gt;
&lt;p&gt;Bill - If there are other specific topics you (or anyone else reading this) would like to see addressed, please suggest them in a comment.&lt;/p&gt;
&lt;p&gt;Regarding the In operator, I don't know of any way slicker than what you've already come up with to get the right result. &amp;nbsp;Unfortunately, we only had time to implement a certain set of query features for VB9.&lt;/p&gt;
&lt;p&gt;As stated above, I'll cover the outer joins more fully next week, since after talking to one of our developers I've got a better answer on how to mimic this with LINQ. &amp;nbsp;Until then, I got the following variation on your query to compile. &amp;nbsp;I hope to explain this all better in Linq to Sql Part 8.&lt;/p&gt;
&lt;p&gt;Dim SecDisplayQuery = _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;From DispSectList In ds4DiagramArray.Sections _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Group Join DispPointList In ds4DiagramArray.Points On _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispSectList.pointid Equals DispPointList.pointid _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Into SectDispInfo = Group _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;From DispPointList In SectDispInfo.DefaultIfEmpty() _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Where DispPointList.typeid = 2 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList.typeid = 3 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList.typeid = 4 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList.typeid = 5 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList.typeid = 6 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList.typeid = 8 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList.typeid = 9 OrElse _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList.typeid = 11 _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Order By DispSectList.ordernum _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Select DispSectList.initialstateon, _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispSectList.pointid, _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList.typeid, _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList.feedbackid, _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList.feedbackdirid, _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList.logicid, _&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DispPointList.address&lt;/p&gt;
</description></item><item><title>Converting SQL to LINQ, Part 7: UNION, TOP, Subqueries (Bill Horst)</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#7032448</link><pubDate>Tue, 08 Jan 2008 23:44:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7032448</guid><dc:creator>The Visual Basic Team</dc:creator><description>&lt;p&gt;This post assumes you’ve read the previous posts in this series: Converting SQL to LINQ, Part 1: The&lt;/p&gt;
</description></item><item><title>Converting SQL to LINQ, Part 8: Left/Right Outer Join (Bill Horst)</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#7356846</link><pubDate>Thu, 31 Jan 2008 22:42:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7356846</guid><dc:creator>The Visual Basic Team</dc:creator><description>&lt;p&gt;This post assumes you’ve read the previous posts in this series. After my post on joins , I’ve had some&lt;/p&gt;
</description></item><item><title>Converting SQL to LINQ, Part 8: Left/Right Outer Join (Bill Horst)</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#7358144</link><pubDate>Thu, 31 Jan 2008 23:42:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7358144</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;This post assumes you’ve read the previous posts in this series. After my post on joins , I’ve had some&lt;/p&gt;
</description></item><item><title>SQL から LINQ への変換、パート 7 : UNION、TOP、サブクエリ (Bill Horst)</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#8557395</link><pubDate>Thu, 29 May 2008 10:50:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8557395</guid><dc:creator>The Visual Basic Team</dc:creator><description>&lt;p&gt;ここでは、このシリーズの前の投稿をお読みになっていることを前提としています。 Converting SQL to LINQ, Part 1: The Basics ( 英語 ) Converting SQL&lt;/p&gt;
</description></item><item><title>SQL から LINQ への変換、パート 8 : 左外部結合と右外部結合 (Bill Horst)</title><link>http://blogs.msdn.com/vbteam/archive/2007/12/31/converting-sql-to-linq-part-6-joins-bill-horst.aspx#8576952</link><pubDate>Fri, 06 Jun 2008 08:00:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8576952</guid><dc:creator>The Visual Basic Team</dc:creator><description>&lt;p&gt;ここでは、このシリーズの 以前の投稿 ( 英語 ) をお読みになっていることを前提としています。 結合 について投稿した後で、外部結合について、いくつかの質問を受けました。パート 6 でご覧になったように、&lt;/p&gt;
</description></item></channel></rss>