<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Edit SQL of Data Connection to Sort Dropdown</title><link>https://www.infopathdev.com:443/forums/thread/8677.aspx</link><pubDate>Wed, 04 Jan 2006 17:17:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8677</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8677.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8677</wfw:commentRss><description>Okay--I made a very silly error--I made changes to one view and was previewing a different one! in fact, the different data connection, where I connected to the child table first and then related the parent table works--my dropdown items are now pulling in ascending order! Hooray!&lt;br /&gt;&lt;br /&gt;Hilary</description></item><item><title>Re: Edit SQL of Data Connection to Sort Dropdown</title><link>https://www.infopathdev.com:443/forums/thread/8676.aspx</link><pubDate>Wed, 04 Jan 2006 16:26:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8676</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8676.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8676</wfw:commentRss><description>Thanks for the suggestions. I tried this:&lt;br /&gt;shape&lt;br /&gt;	{select "Id", "SorterFamily" from "dbo"."SystemConfigs" as "SystemConfigs"} as "SystemConfigs"&lt;br /&gt;	append&lt;br /&gt;		({select "ID","LightingSystems","SystemID" from "dbo"."LightingSystems" as "LightingSystems"} order by "LightingSystems"&lt;br /&gt;			relate "Id" TO "SystemID") as "LightingSystems"&lt;br /&gt;And I got an error. I also tried this:&lt;br /&gt;shape&lt;br /&gt;	{select "Id", "SorterFamily" from "dbo"."SystemConfigs" as "SystemConfigs"} as "SystemConfigs"&lt;br /&gt;	append&lt;br /&gt;		({select "ID","LightingSystems","SystemID" from "dbo"."LightingSystems" as "LightingSystems" order by "LightingSystems"}&lt;br /&gt;			relate "Id" TO "SystemID") as "LightingSystems" order by "LightingSystems"&lt;br /&gt;And got an error. &lt;br /&gt;I even tried a different data connection, connecting to the child table first and then relating the parent and adding the order by clause. My list items continued to be ordered by system ID. It is as if the relationship overrides the order by clause.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hilary</description></item><item><title>Re: Edit SQL of Data Connection to Sort Dropdown</title><link>https://www.infopathdev.com:443/forums/thread/8675.aspx</link><pubDate>Wed, 04 Jan 2006 01:36:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:8675</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/8675.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=8675</wfw:commentRss><description>I'm not great at SQL and that looks like a rather complex statement, but try moving the order by clause outside of the brackets and putting it at the end of the line.&lt;br /&gt;&lt;br /&gt;If that doesn't work, leave the first one where it is and add an additional order by clause at the end.&lt;br /&gt;&lt;br /&gt;Hope this helps, just an educated guess on my part.&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;Matt Faus&lt;br /&gt;InfoPath Dev Texas&lt;br /&gt;</description></item><item><title>Edit SQL of Data Connection to Sort Dropdown</title><link>https://www.infopathdev.com:443/forums/thread/5239.aspx</link><pubDate>Wed, 04 Jan 2006 00:32:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5239</guid><dc:creator>Anonymous</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5239.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5239</wfw:commentRss><description>Hi:&lt;br /&gt;&lt;br /&gt;I have a number of dropdown controls pulling their lists from a SQL database. I have created separate form data connections for each dropdown so that I can add an order by clause and have my list sorted in ascending order. This works very well for my main table. I am unable to get the order by clause to work for my child tables, however. Here is an example of the edited SQL statement for a field from the main table. This successfully orders the data:&lt;br /&gt;select "Id","SorterFamily","ScanRate" from "dbo"."SystemConfigs" as "SystemConfigs" order by "ScanRate"&lt;br /&gt;&lt;br /&gt;Here is an example of the edited SQL statement for a field from a child table. This does not sort the data by the order by clause, instead, it sorts it by "SystemID":&lt;br /&gt;shape&lt;br /&gt;	{select "Id", "SorterFamily" from "dbo"."SystemConfigs" as "SystemConfigs"} as "SystemConfigs"&lt;br /&gt;	append&lt;br /&gt;		({select "ID","LightingSystems","SystemID" from "dbo"."LightingSystems" as "LightingSystems" order by "LightingSystems"}&lt;br /&gt;			relate "Id" TO "SystemID") as "LightingSystems"&lt;br /&gt;&lt;br /&gt;In both cases, the only thing I have added is the order by clause. The rest is the SQL generated by the data connections wizard. Anyone have any ideas of how I can sort a data field from a child table?&lt;br /&gt;&lt;br /&gt;Thanks so much!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hilary</description></item></channel></rss>