<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Subquery.AddOrderBy doesn&#039;t order so well...</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Subquery.AddOrderBy doesn&#039;t order so well...</description>
  <pubDate>Wed, 10 Jun 2026 04:16:00 -700</pubDate>
  <lastBuildDate>Tue, 27 Nov 2007 15:36:56 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=388</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... :  I agree with Paul K&amp;#039;s approach.Here&amp;#039;s...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=2019#2019</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=153" rel="nofollow">pnschofield</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 27-Nov-2007 at 3:36pm<br /><br />I agree with Paul K's approach.<br><br>Here's another way you could approach the problem.&nbsp; If you want your list to be sorted by a property of ShiftFilter, then conceptually, you're performing a query of ShiftFilter, and displaying a list of ShiftFilters in your UI, along with some of the properties of each ShiftFilter's related Shift entity.&nbsp; You would just use an EntityQuery(typeof(ShiftFilter)), bind that to your UI controls and create additional BindingDescriptors that display the desired properties from entity A via navigation.<br><br><p><font color="#2b91af" size="2">EntityQuery</font><font size="2"> query = </font><font color="#0000ff" size="2">new</font><font size="2"> </font><font color="#2b91af" size="2">EntityQuery</font><font size="2">(</font><font color="#0000ff" size="2">typeof</font><font size="2">(</font><font color="#2b91af" size="2">ShiftFilter</font><font size="2">));</font></p><font size="2">query.AddClause(</font><font color="#2b91af" size="2">ShiftFilter</font><font size="2">.RosterIDEntityColumn, </font><font color="#2b91af" size="2">EntityQueryOp</font><font size="2">.EQ, rosterName);</font><p><font size="2">query.AddClause(</font><font color="#2b91af" size="2">ShiftFilter</font><font size="2">.CostCentreIDEntityColumn, </font><font color="#2b91af" size="2">EntityQueryOp</font><font size="2">.EQ, costCentreId);</font></p><p><font size="2">query.Top = 100;</font></p><p><font size="2">query.AddOrderBy(</font><font color="#2b91af" size="2">ShiftFilter</font><font size="2">.OrderEntityColumn, System.ComponentModel.</font><font color="#2b91af" size="2">ListSortDirection</font><font size="2">.Ascending);</font></p><p><font size="2">// Go ahead and pull down all the related Shifts<br>query.AddSpan(EntityRelations.Shift_ShiftFilter.ToParent);<br></font></p><p><font color="#2b91af" size="2">EntityList</font><font size="2">&lt;</font><font color="#2b91af" size="2">ShiftFilter</font><font size="2">&gt; result = m_PersistenceManager.GetEntities&lt;</font><font color="#2b91af" size="2">ShiftFilter</font><font size="2">&gt;(query);</font></p><p><font size="2">// You want the grid to display some of the properties of each ShiftFilter's parent Shift object. <br>// Assuming ShiftFilter has a relation property called Shift:<br></font></p>myGridBindingManager.Descriptors.Add("Property A", "Shift.PropertyA");<br>myGridBindingManager.Descriptors.Add("Property B", "Shift.PropertyB");<br><br>Paul S.<br><br><span style="font-size:10px"><br /><br />Edited by pnschofield - 27-Nov-2007 at 3:37pm</span>]]>
   </description>
   <pubDate>Tue, 27 Nov 2007 15:36:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=2019#2019</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Given that it a sort on a relational...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1959#1959</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=43" rel="nofollow">pkarsh</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 15-Nov-2007 at 4:47pm<br /><br />Given that it a sort on a relational property only makes sense if the relation is 1 to 1, the way to get a list of Entities sorted by the relational property is to use the ApplySort method of the EntityList class.  I have looked into this and AddOrderBy on the subquery has no effect and was never intended to be used for this.<br /><br />In the IdeaBladeTutorial database there is a table called EmployeeExempt.  If you look at this table you will see that it consists of only three columns, Id, SalaryAnnual, and EmployeeId.  There is not a relationship defined in the database between Employee.Id and EmployeeExempt.EmployeeId but it makes sense to define this relationship in the Object Mapper as 1 to 1 with EmployeeExempt being the child Entity.<br /><br />Once you have done this, the following OQL and other code will give you a list of Employees for whom corresponding entries exist in the EmployeeExempt table, sorted by the Employee.EmployeeExempt relational property of the Employee Entity class.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntityQuery aQuery = new EntityQuery(typeof (Employee));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntitySubquery aEmployeeExemptSubquery = aQuery.AddSubquery(EntityRelations.Employee_EmployeeExempt, QueryDirection.ChildQuery);<br /> <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntityList&lt;Employee&gt; MyEntityList = mPm.GetEntities&lt;Employee&gt;(aQuery);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MyEntityList.ApplySort("EmployeeExempt", System.ComponentModel.ListSortDirection.Ascending, true);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (Employee aEntityInstance in MyEntityList) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("EmployeeExempt Id is:  {0}, Employee Id is {1}, Employee salary is:  {2}", aEntityInstance.EmployeeExempt.Id.ToString(), aEntityInstance.Id.ToString(), aEntityInstance.EmployeeExempt.SalaryAnnual.ToString());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br /><br />If someone thought that the behavior of AddOrderBy on a subquery had changed they are mistaken.  I am guessing that they thought it was doing a sort because the data was being returned in an order such that it appeared that a sort was being applied and now it is not.<br /><br />Hope this helps.<br /><br />Paul K.<br /><span style="font-size:10px"><br /><br />Edited by pkarsh - 15-Nov-2007 at 5:29pm</span>]]>
   </description>
   <pubDate>Thu, 15 Nov 2007 16:47:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1959#1959</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Hi Paul  You are correct. The...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1952#1952</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=42" rel="nofollow">Markh</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 15-Nov-2007 at 2:06pm<br /><br /><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN-AU><FONT size=3><FONT face=Calibri>Hi Paul<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN-AU><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN-AU><FONT size=3><FONT face=Calibri>You are correct. The behaviour we expected was present in an early version of DevForce . Unfortunately this was <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>prototype <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>code, which has now been discarded.<o:p></o:p></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN-AU><FONT size=3><FONT face=Calibri>I believe the version we had before <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>3.5.3.1 was 3.5.2.3, but I am not sure that 3.5.2.3 was the version used in the prototype code.<o:p></o:p></FONT></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN-AU><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN-AU><FONT size=3><FONT face=Calibri>thanks<o:p></o:p></FONT></FONT></SPAN></P>]]>
   </description>
   <pubDate>Thu, 15 Nov 2007 14:06:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1952#1952</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : I get the idea that the behavior...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1950#1950</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=43" rel="nofollow">pkarsh</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 15-Nov-2007 at 12:25pm<br /><br />I get the idea that the behavior you expected was present in some earlier version of DevForce.  Am I correct in thinking that?  If so, which version?<br />]]>
   </description>
   <pubDate>Thu, 15 Nov 2007 12:25:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1950#1950</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... :  Hi Paul Sorry. You have answered....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1943#1943</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=42" rel="nofollow">Markh</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 14-Nov-2007 at 8:54pm<br /><br /><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-: EN"><DIV>Hi Paul</DIV><DIV>Sorry. You have answered. (I should read the responses more judiciously)<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><O:P></O:P></SPAN></DIV><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-: EN">My expectation on the order by, was that it would order the Customers by freight value. <O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-: EN"><O:P>&nbsp;</O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-: EN">You are correct the original problem by jozza was in fact a one to one relation.<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-: EN">A previous version of Devforce ordered the Shift Entities by a numeric value, in the </SPAN><SPAN lang=EN-AU style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'">subQuery OrderBy, stored in the ShiftFilter entities.</SPAN><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-: EN"><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-ansi-: EN">There for we expected the first entity to be ordered by the result set of the second entity.<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN-AU><O:P><FONT face=Calibri size=3>&nbsp;</FONT></O:P></SPAN></P><P>&nbsp;</P><span style="font-size:10px"><br /><br />Edited by Markh - 14-Nov-2007 at 8:55pm</span>]]>
   </description>
   <pubDate>Wed, 14 Nov 2007 20:54:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1943#1943</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Hi Mark  This SQL appears to be...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1942#1942</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=43" rel="nofollow">pkarsh</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 14-Nov-2007 at 5:38pm<br /><br />Hi Mark<br /><br />This SQL appears to be almost exactly what I had included in my post of Nov. 13.  In addition to this SQL, I also included some OQL that would give results that to my best understanding roughly corresponds to what it appears that you are looking for as indicated in your previous post.  This OQL queries against the OrderSummary object and not the Customer object.<br /><br />I remain puzzled as to what you are looking for that is not addressed in the post I mention above.  <br /><br />I still suspect that in the specific situation that you and others who have participated in this thread are working with, as opposed to the examples using our IdeaBladeTutorial database that I have given, that the relations you are working with are 1 to 1.  Only in that situation would the desire to sort by a relational property as the most significant sort field make sense.<br /><br />If you or someone else in this thread can address these specific questions I would appreciate it.<br /><br />Regards,<br />Paul K.]]>
   </description>
   <pubDate>Wed, 14 Nov 2007 17:38:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1942#1942</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Paul   Here is are the two scripts...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1941#1941</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=42" rel="nofollow">Markh</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 14-Nov-2007 at 4:19pm<br /><br /><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">Paul <?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">Here is are the two scripts from Debuglog.xml<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">RdbKey: &#091;Default&#093; Sql: select * from "dbo"."Customer" where (("dbo"."Customer"."Id" in (select TOP 1000 "CustomerId" from "dbo"."OrderSummary" ORDER BY "dbo"."OrderSummary"."Freight" ASC) and "dbo"."Customer"."Id"&lt;?)) Params: v0=11<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">script 2<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">RdbKey: &#091;Default&#093; Sql: select TOP 1000 * from "dbo"."OrderSummary" where ("dbo"."OrderSummary"."CustomerId" in (select "dbo"."Customer"."Id" from "dbo"."Customer" where (("dbo"."Customer"."Id" in (select TOP 1000 "CustomerId" from "dbo"."OrderSummary" ORDER BY "dbo"."OrderSummary"."Freight" ASC) and "dbo"."Customer"."Id"&lt;?)))) ORDER BY "dbo"."OrderSummary"."Freight" ASC Params: v0=11<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">the two scripts converted to run in SQL<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">Script 1<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">&nbsp;<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes">select</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes"> <SPAN style="COLOR: gray">*</SPAN> <SPAN style="COLOR: blue">from</SPAN> "dbo"<SPAN style="COLOR: gray">.</SPAN>"Customer" <SPAN style="COLOR: blue">where</SPAN> <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes">((</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes">"dbo"<SPAN style="COLOR: gray">.</SPAN>"Customer"<SPAN style="COLOR: gray">.</SPAN>"Id" <SPAN style="COLOR: gray">in</SPAN> <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes">(</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes">select</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes"> <SPAN style="COLOR: blue">TOP</SPAN> 1000 "CustomerId" <SPAN style="COLOR: blue">from</SPAN> "dbo"<SPAN style="COLOR: gray">.</SPAN>"OrderSummary" <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes">ORDER</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes"> <SPAN style="COLOR: blue">BY</SPAN> "dbo"<SPAN style="COLOR: gray">.</SPAN>"OrderSummary"<SPAN style="COLOR: gray">.</SPAN>"Freight" <SPAN style="COLOR: blue">ASC</SPAN><SPAN style="COLOR: gray">)</SPAN> <SPAN style="COLOR: gray">and</SPAN> "dbo"<SPAN style="COLOR: gray">.</SPAN>"Customer"<SPAN style="COLOR: gray">.</SPAN>"Id"<SPAN style="COLOR: gray">&lt;</SPAN>11<SPAN style="COLOR: gray">))<o:p></o:p></SPAN></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">Script 2<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN-AU><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes">select</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes"> <SPAN style="COLOR: blue">TOP</SPAN> 1000 <SPAN style="COLOR: gray">*</SPAN> <SPAN style="COLOR: blue">from</SPAN> "dbo"<SPAN style="COLOR: gray">.</SPAN>"OrderSummary" <SPAN style="COLOR: blue">where</SPAN> <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">(</SPAN>"dbo"<SPAN style="COLOR: gray">.</SPAN>"OrderSummary"<SPAN style="COLOR: gray">.</SPAN>"CustomerId" <SPAN style="COLOR: gray">in</SPAN> <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">(</SPAN><SPAN style="COLOR: blue">select</SPAN> "dbo"<SPAN style="COLOR: gray">.</SPAN>"Customer"<SPAN style="COLOR: gray">.</SPAN>"Id" <SPAN style="COLOR: blue">from</SPAN> "dbo"<SPAN style="COLOR: gray">.</SPAN>"Customer" <SPAN style="COLOR: blue">where</SPAN> <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">((</SPAN>"dbo"<SPAN style="COLOR: gray">.</SPAN>"Customer"<SPAN style="COLOR: gray">.</SPAN>"Id" <SPAN style="COLOR: gray">in</SPAN> <o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: gray">(</SPAN><SPAN style="COLOR: blue">select</SPAN> <SPAN style="COLOR: blue">TOP</SPAN> 1000 "CustomerId" <SPAN style="COLOR: blue">from</SPAN> "dbo"<SPAN style="COLOR: gray">.</SPAN>"OrderSummary" <SPAN style="COLOR: blue">ORDER</SPAN> <SPAN style="COLOR: blue">BY</SPAN> "dbo"<SPAN style="COLOR: gray">.</SPAN>"OrderSummary"<SPAN style="COLOR: gray">.</SPAN>"Freight" <SPAN style="COLOR: blue">ASC</SPAN><SPAN style="COLOR: gray">)<o:p></o:p></SPAN></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-: EN-US; mso-no-proof: yes"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;</SPAN><SPAN style="COLOR: gray">and</SPAN> "dbo"<SPAN style="COLOR: gray">.</SPAN>"Customer"<SPAN style="COLOR: gray">.</SPAN>"Id"<SPAN style="COLOR: gray">&lt;</SPAN>11 <SPAN style="COLOR: gray">))))</SPAN> <SPAN style="COLOR: blue">ORDER</SPAN> <SPAN style="COLOR: blue">BY</SPAN> "dbo"<SPAN style="COLOR: gray">.</SPAN>"OrderSummary"<SPAN style="COLOR: gray">.</SPAN>"Freight" <SPAN style="COLOR: blue">ASC</SPAN></SPAN><SPAN lang=EN-AU><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN-AU><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN lang=EN-AU><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></SPAN></P>]]>
   </description>
   <pubDate>Wed, 14 Nov 2007 16:19:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1941#1941</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Hi Mark  It looks to me like the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1936#1936</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=43" rel="nofollow">pkarsh</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 14-Nov-2007 at 3:03pm<br /><br />Hi Mark<br /><br />It looks to me like the SQL results you have posted are actually a query against the Order table (or OrderSummary as it actually is in the database).  If I'm wrong about that please let me know.  Also, if you could post the actual SQL that gave you those results it would be helpful as well.<br /><br />Thanks.<br /><br />Paul K.<br />]]>
   </description>
   <pubDate>Wed, 14 Nov 2007 15:03:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1936#1936</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Paul   With the ,order by, I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1935#1935</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=42" rel="nofollow">Markh</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 14-Nov-2007 at 2:50pm<br /><br /><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">Paul <?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN"><O:P>&nbsp;</O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">With the ,order by, I was expecting, that it&nbsp;was not Freight by each customer, Only Order by Frieght. Which is the result set of the second sql script.<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">The first customer should have been<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">Order Id is: -0.01 Customer is: Blauer See Delikatessen<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">Second <O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">Order Id is: 1.18 Customer is: Alfreds Futterkistex<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">Etc...<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN"><O:P>&nbsp;</O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN"><O:P>&nbsp;</O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">My results where as follows<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">&nbsp;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">Order Id is: 1.48 Customer is: Ana Trujillo Emparedados y helados<BR>Order Id is: 11.91 Customer is: Ana Trujillo Emparedados y helados<BR>Order Id is: 39.87 Customer is: Ana Trujillo Emparedados y helados<BR>Order Id is: 43.8 Customer is: Ana Trujillo Emparedados y helados<BR>Order Id is: 2.98 Customer is: Around the Horn<BR>Order Id is: 4.44 Customer is: Around the Horn<BR>Order Id is: 10.88 Customer is: Around the Horn<BR>Order Id is: 21.66 Customer is: Around the Horn<BR>Order Id is: 23.64 Customer is: Around the Horn<BR>Order Id is: 23.68 Customer is: Around the Horn<BR>Order Id is: 25.22 Customer is: Around the Horn<BR>Order Id is: 29.56 Customer is: Around the Horn<BR>Order Id is: 33.77 Customer is: Around the Horn<BR>Order Id is: 34.07 Customer is: Around the Horn<BR>Order Id is: 41.79 Customer is: Around the Horn<BR>Order Id is: 172.83 Customer is: Around the Horn<BR>Order Id is: 1146.24 Customer is: Around the Horn<BR>Order Id is: 5.59 Customer is: Blondesddsl père et fils<BR>Order Id is: 7.01 Customer is: Blondesddsl père et fils<BR>Order Id is: 7.91 Customer is: Blondesddsl père et fils<BR>Order Id is: 27.85 Customer is: Blondesddsl père et fils<BR>Order Id is: 30.26 Customer is: Blondesddsl père et fils<BR>Order Id is: 53.16 Customer is: Blondesddsl père et fils<BR>Order Id is: 55.04 Customer is: Blondesddsl père et fils<BR>Order Id is: 59.02 Customer is: Blondesddsl père et fils<BR>Order Id is: 88.26 Customer is: Blondesddsl père et fils<BR>Order Id is: 131.54 Customer is: Blondesddsl père et fils<BR>Order Id is: 156.51 Customer is: Blondesddsl père et fils<BR>Order Id is: -0.01 Customer is: Blauer See Delikatessen<BR>Order Id is: 1.83 Customer is: Blauer See Delikatessen<BR>Order Id is: 8.69 Customer is: Blauer See Delikatessen<BR>Order Id is: 27.59 Customer is: Blauer See Delikatessen<BR>Order Id is: 31.11 Customer is: Blauer See Delikatessen<BR>Order Id is: 44.61 Customer is: Blauer See Delikatessen<BR>Order Id is: 53.77 Customer is: Blauer See Delikatessen<BR>Order Id is: 2.22 Customer is: Bottom-Dollar Markets<BR>Order Id is: 13.97 Customer is: Bottom-Dollar Markets<BR>Order Id is: 23.46 Customer is: Bottom-Dollar Markets<BR>Order Id is: 24.09 Customer is: Bottom-Dollar Markets<BR>Order Id is: 32.23 Customer is: Bottom-Dollar Markets<BR>Order Id is: 44.02 Customer is: Bottom-Dollar Markets<BR>Order Id is: 47.25 Customer is: Bottom-Dollar Markets<BR>Order Id is: 48.78 Customer is: Bottom-Dollar Markets<BR>Order Id is: 52.49 Customer is: Bottom-Dollar Markets<BR>Order Id is: 52.87 Customer is: Bottom-Dollar Markets<BR>Order Id is: 62.74 Customer is: Bottom-Dollar Markets<BR>Order Id is: 70.55 Customer is: Bottom-Dollar Markets<BR>Order Id is: 74.39 Customer is: Bottom-Dollar Markets<BR>Order Id is: 243.65 Customer is: Bottom-Dollar Markets<BR>Order Id is: 1.18 Customer is: Alfreds Futterkistex<BR>Order Id is: 29.37 Customer is: Alfreds Futterkistex<BR>Order Id is: 40.38 Customer is: Alfreds Futterkistex<BR>Order Id is: 60.93 Customer is: Alfreds Futterkistex<BR>Order Id is: 69.45 Customer is: Alfreds Futterkistex<BR>Order Id is: 123.86 Customer is: Alfreds Futterkistex<BR>Order Id is: 3.35 Customer is: Berglunds snabbköp<BR>Order Id is: 6.71 Customer is: Berglunds snabbköp<BR>Order Id is: 8.78 Customer is: Berglunds snabbköp<BR>Order Id is: 9.15 Customer is: Berglunds snabbköp<BR>Order Id is: 13.25 Customer is: Berglunds snabbköp<BR>Order Id is: 13.33 Customer is: Berglunds snabbköp<BR>Order Id is: 32.31 Customer is: Berglunds snabbköp<BR>Order Id is: 55.17 Customer is: Berglunds snabbköp<BR>Order Id is: 92.48 Customer is: Berglunds snabbköp<BR>Order Id is: 95.66 Customer is: Berglunds snabbköp<BR>Order Id is: 109.05 Customer is: Berglunds snabbköp<BR>Order Id is: 110.03 Customer is: Berglunds snabbköp<BR>Order Id is: 116.3 Customer is: Berglunds snabbköp<BR>Order Id is: 138.59 Customer is: Berglunds snabbköp<BR>Order Id is: 151.47 Customer is: Berglunds snabbköp<BR>Order Id is: 168.47 Customer is: Berglunds snabbköp<BR>Order Id is: 188.79 Customer is: Berglunds snabbköp<BR>Order Id is: 244.65 Customer is: Berglunds snabbköp<BR>Order Id is: 3.94 Customer is: Antonio Moreno Taquería<BR>Order Id is: 15.5 Customer is: Antonio Moreno Taquería<BR>Order Id is: 21.83 Customer is: Antonio Moreno Taquería<BR>Order Id is: 36.04 Customer is: Antonio Moreno Taquería<BR>Order Id is: 47.29 Customer is: Antonio Moreno Taquería<BR>Order Id is: 58.37 Customer is: Antonio Moreno Taquería<BR>Order Id is: 84.71 Customer is: Antonio Moreno Taquería<BR>Order Id is: 16.12 Customer is: Bólido Comidas preparadas<BR>Order Id is: 77.75 Customer is: Bólido Comidas preparadas<BR>Order Id is: 97.01 Customer is: Bólido Comidas preparadas<BR>Order Id is: 10.03 Customer is: Bon app'<BR>Order Id is: 10.92 Customer is: Bon app'<BR>Order Id is: 16.63 Customer is: Bon app'<BR>Order Id is: 16.89 Customer is: Bon app'<BR>Order Id is: 19.72 Customer is: Bon app'<BR>Order Id is: 20.04 Customer is: Bon app'<BR>Order Id is: 38.25 Customer is: Bon app'<BR>Order Id is: 60.37 Customer is: Bon app'<BR>Order Id is: 63.12 Customer is: Bon app'<BR>Order Id is: 63.46 Customer is: Bon app'<BR>Order Id is: 64.41 Customer is: Bon app'<BR>Order Id is: 95.87 Customer is: Bon app'<BR>Order Id is: 112.21 Customer is: Bon app'<BR>Order Id is: 113.06 Customer is: Bon app'<BR>Order Id is: 134.59 Customer is: Bon app'<BR>Order Id is: 166.16 Customer is: Bon app'<BR>Order Id is: 350.48 Customer is: Bon app'<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">&nbsp;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">Sql script<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">I reduced the sql to<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>OrderId,CustomerId,Frieght<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">&nbsp;<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10509<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>6<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>-0.01<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">11011<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>1<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1.18<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10308<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>2<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1.48<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10614<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>6<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1.83<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10410<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>2.22<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10864<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>2.98<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10444<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>3.35<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10677<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>3<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>3.94<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10793<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>4.44<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10297<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>7<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>5.59<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10778<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>6.71<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10826<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>7<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>7.01<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10559<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>7<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>7.91<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10501<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>6<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>8.69<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10280<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>8.78<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10445<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>9.15<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10331<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>10.03<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10741<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>10.88<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10525<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>10.92<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10759<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>2<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>11.91<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10837<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>13.25<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10689<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>13.33<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10982<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>13.97<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10535<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>3<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>15.50<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10970<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>8<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>16.12<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10755<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>16.63<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10732<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>16.89<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10940<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>19.72<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10730<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>20.04<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10707<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>21.66<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10365<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>3<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>21.83<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10411<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>23.46<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10743<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>23.64<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10953<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>23.68<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">11048<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>24.09<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10453<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>25.22<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10582<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>6<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>27.59<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10679<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>7<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>27.85<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10643<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>1<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>29.37<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10920<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>29.56<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10628<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>7<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>30.26<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">11058<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>6<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>31.11<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10975<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>32.23<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10875<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>32.31<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">11016<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>33.77<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10383<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>34.07<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10682<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>3<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>36.04<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">11076<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>38.25<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10926<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>2<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>39.87<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10952<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>1<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>40.38<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10355<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>41.79<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10625<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>2<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>43.80<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10431<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>44.02<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10956<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>6<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>44.61<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10389<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>47.25<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10507<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>3<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>47.29<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10918<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>48.78<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">11027<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>52.49<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10944<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>52.87<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10449<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>7<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>53.16<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10853<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>6<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>53.77<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10265<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>7<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>55.04<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10654<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>55.17<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10856<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>3<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>58.37<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10584<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>7<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>59.02<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10876<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>60.37<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10692<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>1<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>60.93<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10492<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>62.74<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10715<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>63.12<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10827<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>63.46<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10470<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>64.41<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10835<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>1<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>69.45<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">11045<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>70.55<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10949<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>74.39<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10326<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>8<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>77.75<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10573<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>3<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>84.71<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10566<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>7<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>88.26<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10278<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>92.48<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10672<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>95.66<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10362<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>95.87<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10801<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>8<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>97.01<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10866<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>109.05<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10733<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>110.03<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10871<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>112.21<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10663<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>113.06<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10572<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>116.30<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10702<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>1<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>123.86<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10360<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>7<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>131.54<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10932<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>134.59<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10626<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>138.59<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10924<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>151.47<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10436<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>7<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>156.51<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10340<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>166.16<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10384<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>168.47<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10558<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>172.83<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10857<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>188.79<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10742<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>10<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>243.65<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10524<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>5<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>244.65<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10511<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>9<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>350.48<O:P></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: 'Verdana','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-: EN">10768<SPAN style="mso-tab-count: 1">&nbsp; </SPAN>4<SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>1146.24</SPAN><SPAN lang=EN-AU><O:P></O:P></SPAN></P><span style="font-size:10px"><br /><br />Edited by Markh - 14-Nov-2007 at 2:53pm</span>]]>
   </description>
   <pubDate>Wed, 14 Nov 2007 14:50:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1935#1935</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Hi Mark  I did as you suggested...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1931#1931</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=43" rel="nofollow">pkarsh</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 14-Nov-2007 at 10:23am<br /><br />Hi Mark<br /><br />I did as you suggested and I get the same result.  The orders for each customer are sorted by freight cost.  I don't see anything basically different.<br /><br />Paul K.<br />]]>
   </description>
   <pubDate>Wed, 14 Nov 2007 10:23:25 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1931#1931</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Paul  Change your order by clause...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1929#1929</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=42" rel="nofollow">Markh</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 13-Nov-2007 at 10:13pm<br /><br />Paul<DIV>&nbsp;</DIV><DIV>Change your order by clause </DIV><DIV>from</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aOrderSubquery.AddOrderBy(OrderSummary.IdEntityColumn); <BR>to </DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; aOrderSubquery.AddOrderByOrderSummary.<FONT size=2>FreightCostEntityColumn</FONT>); <BR></DIV><DIV>Now rerun your query test</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 13 Nov 2007 22:13:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1929#1929</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Hi  I get confused when you say...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1926#1926</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=43" rel="nofollow">pkarsh</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 13-Nov-2007 at 7:03pm<br /><br />Hi<br /><br />I get confused when you say it should return records in the same order as the generated SQL because when I try this out I get not one but two SQL commands that between them get the data that the OQL is asking for.  I don't see that the OQL could return data in a different order than it does, given what it is asked to do.  If what I have done is different from what you are looking for please let me know.  <br /><br />Let me step through what I did.<br /><br />I wrote the following OQL against the IdeaBladeTutorial database:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntityQuery aQuery = new EntityQuery(typeof (Customer));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aQuery.AddClause(Customer.IdEntityColumn, EntityQueryOp.LT, 11); // restrict amount of data<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntitySubquery aOrderSubquery = aQuery.AddSubquery(EntityRelations.Customer_OrderSummary);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aOrderSubquery.AddOrderBy(OrderSummary.IdEntityColumn);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aOrderSubquery.Top = 1000;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntityList&lt;Customer&gt; MyEntityList = mPm.GetEntities&lt;Customer&gt;(aQuery);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int rowcount = 0;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (Customer aEntityInstance in MyEntityList) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (OrderSummary aOrderSummary in aEntityInstance.OrderSummaries) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.Write("Order Id is:  {0}", aOrderSummary.Id.ToString());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Console.WriteLine("  Customer is:  {0}", aEntityInstance.CompanyName);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rowcount++;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br /><br />As you can see, I am querying against Customer and have added an "AddOrderBy" call to a subquery on OrderSummary, which is a child Entity to Customer where there will be "many" orders for a given Customer.  When I run the application I get output that is grouped by Customer for Customers whose ID's are 1 through 10.  I do this just to reduce the amount of data that we are looking at.  The OrderSummaryId's for each customer are sorted in ascending order.  I won't show the total output but a sample of the output for the first few customers looks like this:<br /><br />Order Id is:  10308  Customer is:  Ana Trujillo Emparedados y helados<br />Order Id is:  10625  Customer is:  Ana Trujillo Emparedados y helados<br />Order Id is:  10759  Customer is:  Ana Trujillo Emparedados y helados<br />Order Id is:  10926  Customer is:  Ana Trujillo Emparedados y helados<br />Order Id is:  10389  Customer is:  Bottom-Dollar Markets<br />Order Id is:  10410  Customer is:  Bottom-Dollar Markets<br />Order Id is:  10411  Customer is:  Bottom-Dollar Markets<br />Order Id is:  10431  Customer is:  Bottom-Dollar Markets<br />Order Id is:  10492  Customer is:  Bottom-Dollar Markets<br />Order Id is:  10742  Customer is:  Bottom-Dollar Markets<br />Order Id is:  10918  Customer is:  Bottom-Dollar Markets<br />Order Id is:  10944  Customer is:  Bottom-Dollar Markets<br />Order Id is:  10949  Customer is:  Bottom-Dollar Markets<br />Order Id is:  10975  Customer is:  Bottom-Dollar Markets<br />Order Id is:  10982  Customer is:  Bottom-Dollar Markets<br />Order Id is:  11027  Customer is:  Bottom-Dollar Markets<br />Order Id is:  11045  Customer is:  Bottom-Dollar Markets<br />Order Id is:  11048  Customer is:  Bottom-Dollar Markets<br />Order Id is:  10326  Customer is:  B¢lido Comidas preparadas<br />Order Id is:  10801  Customer is:  B¢lido Comidas preparadas<br />Order Id is:  10970  Customer is:  B¢lido Comidas preparadas<br /><br />When I look in the DebugLog I see basically two SQL queries.  These are as follows:<br /><br />Query for customers:<br /><br />RdbKey: &#091;default&#093; Sql: select * from "dbo"."Customer" where (("dbo"."Customer"."Id" in (select TOP 1000 "CustomerId" from "dbo"."OrderSummary" ORDER BY "dbo"."OrderSummary"."Id" ASC) and "dbo"."Customer"."Id"&lt;?)) Params: v0=11<br /><br />Query for OrderSummaries:<br /><br />RdbKey: &#091;default&#093; Sql: select TOP 1000 * from "dbo"."OrderSummary" where ("dbo"."OrderSummary"."CustomerId" in (select "dbo"."Customer"."Id" from "dbo"."Customer" where (("dbo"."Customer"."Id" in (select TOP 1000 "CustomerId" from "dbo"."OrderSummary" ORDER BY "dbo"."OrderSummary"."Id" ASC) and "dbo"."Customer"."Id"&lt;?)))) ORDER BY "dbo"."OrderSummary"."Id" ASC Params: v0=11<br /><br />If I paste these queries into Query windows in SQL Server Management Studio and make the modifications needed to get them to run (removing the text "RdbKey:  &#091;default&#093; Sql:  " at the beginning and replacing the ? in the query text with the value in the Params: directive, and then run them, I get the following results:<br /><br />For the first query, I get the Customer records from 1 to 10.  For the second query, I get the OrderSummary records ordered by their Id.<br /><br />So far, the results I am getting are pretty much what I would expect. It had occurred to me that perhaps what people are looking for is a list of Customers ordered by the Id's of the orders they had placed, but then it occurred to me that this wouldn't make sense as each customer has several orders.  If that is what someone is looking for, they should create an EntityQuery that returns OrderSummaries.  The Sql generated by this would resemble the second SQL query above.  <br /><br />I did write OQL code that does this.  It looks like this:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntityQuery aQuery = new EntityQuery(typeof (OrderSummary));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aQuery.AddOrderBy(OrderSummary.IdEntityColumn);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntitySubquery aCustomerSubquery = aQuery.AddSubquery(EntityRelations.Customer_OrderSummary);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aCustomerSubquery.AddClause(Customer.IdEntityColumn, EntityQueryOp.LT, 11);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EntityList&lt;OrderSummary&gt; MyEntityList = mPm.GetEntities&lt;OrderSummary&gt;(aQuery);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int rowcount = 0;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach (OrderSummary aEntityInstance in MyEntityList) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine("OrderSummary Id is:  {0}, Customer is:  {1}", aEntityInstance.Id.ToString(), aEntityInstance.Customer.CompanyName);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rowcount++;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />It returns a list of OrderSummaries ordered by their Id.<br /><br />Keep in mind that all of this is based on a 1 to many relationship between the parent and child Entity types.  I can see that for parent and child Entity types where there is a 1 to 1 relationship it might make sense to sort by the Id's of the child Entities.  I had asked the other poster on this thread if that was what he was interested in but so far I have not gotten a reply.  If this is what you are interested in please send me a private message and I will look into it.  If the OQL examples I have shown above do not correspond to your situation let me know and we can try to work out an example that does.<br /><br />I would very much like to hear back from you or shoey on this.<br /> <br /><br />]]>
   </description>
   <pubDate>Tue, 13 Nov 2007 19:03:39 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1926#1926</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Hi Shoey  Unfortunately Devforce...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1923#1923</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=77" rel="nofollow">jozza</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 13-Nov-2007 at 2:54pm<br /><br />Hi Shoey<DIV>&nbsp;</DIV><DIV>Unfortunately Devforce fail to see this as a problem :(</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 13 Nov 2007 14:54:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1923#1923</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Hi, My expectation is simply...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1921#1921</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=77" rel="nofollow">jozza</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 13-Nov-2007 at 2:44pm<br /><br /><P>Hi,</P><P>My expectation is simply that devforce returns data in the same order as it is returned in SQL. Like i mentioned, when the query from the debug xml is fed into query analyser it returns the data in the expected order, however the list in devforce is ordered differently. I think it should be a reasonable assumption that ordering should reflect sql ordering.</P><P>&nbsp;</P><P>Cheers.</P>]]>
   </description>
   <pubDate>Tue, 13 Nov 2007 14:44:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1921#1921</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : What is your expectation?  In...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1887#1887</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=43" rel="nofollow">pkarsh</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 06-Nov-2007 at 6:21pm<br /><br />What is your expectation?<br /><br />In the case of Entity A which has a relational property B, if B is an EntityList (actually a ReadOnlyEntityList), then if ApplySort is added to a subquery that accesses (so to speak) property B, then for each A the Entities in B will be sorted as specified.  From what I can see, this will have no effect on the order of the EntityList of A Entities.<br /><br />Do you have a different expectation?  Are you making a distinction between a relational property based on a 1 to 1 relation versus a relational property based on a 1 to many relation?<br />]]>
   </description>
   <pubDate>Tue, 06 Nov 2007 18:21:16 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1887#1887</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Hi Have you heard anything from...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1881#1881</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=182" rel="nofollow">shoey</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 06-Nov-2007 at 9:38am<br /><br />Hi Have you heard anything from ideablade about this as we are having the same issue. using ib version 3.5.1.1<br><br><br>]]>
   </description>
   <pubDate>Tue, 06 Nov 2007 09:38:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=1881#1881</guid>
  </item> 
  <item>
   <title>Subquery.AddOrderBy doesn&#039;t order so well... : Hi  There seems to be an issue...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=995#995</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=77" rel="nofollow">jozza</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 28-Aug-2007 at 12:00am<br /><br /><P>Hi</P><DIV>&nbsp;</DIV><DIV>There seems to be an issue with the AddOrderBy method. I have the following query: </DIV><DIV>&nbsp;</DIV><FONT color=#2b91af size=2><P>EntityQuery</FONT><FONT size=2> query = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>EntityQuery</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>typeof</FONT><FONT size=2>(</FONT><FONT color=#2b91af size=2>Shifts</FONT><FONT size=2>));</P><P></FONT><FONT color=#008000 size=2>//Match on cost centre and roster name using the relationship.</P></FONT><FONT size=2><P></FONT><FONT color=#2b91af size=2>EntitySubquery</FONT><FONT size=2> subQuery = query.AddSubquery(</FONT><FONT color=#2b91af size=2>EntityRelations</FONT><FONT size=2>.ShiftFilter_Shifts); </P><P>subQuery.AddClause(</FONT><FONT color=#2b91af size=2>ShiftFilter</FONT><FONT size=2>.RosterIDEntityColumn, </FONT><FONT color=#2b91af size=2>EntityQueryOp</FONT><FONT size=2>.EQ, rosterName);</P><P>subQuery.AddClause(</FONT><FONT color=#2b91af size=2>ShiftFilter</FONT><FONT size=2>.CostCentreIDEntityColumn, </FONT><FONT color=#2b91af size=2>EntityQueryOp</FONT><FONT size=2>.EQ, costCentreId);</P><P>subQuery.Top = 100;</P><P>subQuery.AddOrderBy(</FONT><FONT color=#2b91af size=2>ShiftFilter</FONT><FONT size=2>.OrderEntityColumn, System.ComponentModel.</FONT><FONT color=#2b91af size=2>ListSortDirection</FONT><FONT size=2>.Ascending);</P><P></FONT><FONT color=#2b91af size=2>EntityList</FONT><FONT size=2>&lt;</FONT><FONT color=#2b91af size=2>Shifts</FONT><FONT size=2>&gt; result = m_PersistenceManager.GetEntities&lt;</FONT><FONT color=#2b91af size=2>Shifts</FONT><FONT size=2>&gt;(query);</P><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV>When i look in the DebugLog.Xml it&nbsp;generates the following SQL:<DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV>select TOP 100 * from "dbo"."MIC_CC_Shift_Edit" where ((("dbo"."MIC_CC_Shift_Edit"."NM_SHIFT" in (select "dbo"."MIC_Shifts"."NM_SHIFT" from "dbo"."MIC_Shifts" where ("dbo"."MIC_Shifts"."NM_SHIFT" in (select TOP 100 "NM_SHIFT" from "dbo"."MIC_CC_Shift_Edit" where (("dbo"."MIC_CC_Shift_Edit"."ID_COST_CENTRE"=@v3 and "dbo"."MIC_CC_Shift_Edit"."NM_ROSTER"=@v2)) ORDER BY "dbo"."MIC_CC_Shift_Edit"."No_Order_Number" ASC))) and "dbo"."MIC_CC_Shift_Edit"."ID_COST_CENTRE"=@v1) and "dbo"."MIC_CC_Shift_Edit"."NM_ROSTER"=@v0)) ORDER BY "dbo"."MIC_CC_Shift_Edit"."No_Order_Number" ASC <DIV></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>When I pump this sql directly into query analyser, it returns the items in the correct order. However, the EntityList&lt;Shifts&gt; result does not receive the data in the correct order. We've prototyped using this approach in the past on older versions of devforce, but in 3.5.3 this doesn't work (unfortunately we don't have the old prototype code to test against 3.5.3). However, I would expect that the entitylist should contain the records in the order that they are returned from SQL.</DIV><DIV>&nbsp;</DIV><DIV>Cheers</DIV><DIV>&nbsp;</DIV><DIV>Jacob</DIV></FONT>]]>
   </description>
   <pubDate>Tue, 28 Aug 2007 00:00:28 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=388&amp;PID=995#995</guid>
  </item> 
 </channel>
</rss>