<?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>SQL Database Integration</title><link>https://www.infopathdev.com:443/forums/47.aspx</link><description>For questions concerning issues in the integration of SQL and Microsoft InfoPath.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Shape command with Where clause and Order By clause</title><link>https://www.infopathdev.com:443/forums/thread/26112.aspx</link><pubDate>Thu, 31 Jan 2008 12:50:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26112</guid><dc:creator>m181354</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26112.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=26112</wfw:commentRss><description>&lt;p&gt;That worked great!&amp;nbsp; Thanks &amp;nbsp; Now what about the Order&amp;nbsp;By clause?&amp;nbsp; I get an error with the below code on the Order By clause. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;command += &amp;quot;{select * &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;from &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;[LaborSummary] as [LaborSummary] &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;where (LaborSummary.[CA1] = &amp;#39;&amp;quot; + ca1Prefix + &amp;quot;&amp;#39;)} &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;append &amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;command += &amp;quot;({select * &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;from &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;[DistributedRecords] as [DistributedRecords]}&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;command += &amp;quot;relate [CA1] to [CA1],[HOUR_DOLLAR] TO [HOUR_DOLLAR]) as [DistributedRecords] &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;order by DistributedRecords.[CA1], DistributedRecords.[BE], DistributedRecords.[DATE]&amp;quot;; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Shape command with Where clause</title><link>https://www.infopathdev.com:443/forums/thread/26099.aspx</link><pubDate>Wed, 30 Jan 2008 23:20:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26099</guid><dc:creator>djay</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26099.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=26099</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m not a SQL expert, but I believe you need the } after the where clause.&amp;nbsp; So I would have:&lt;/p&gt;
&lt;p&gt;...from &amp;quot;dbo&amp;quot;.&amp;quot;LaborSummary&amp;quot; as &amp;quot;LaborSummary&amp;quot; where &amp;quot;SA1&amp;quot; = &amp;quot;whatever&amp;quot;} as &amp;quot;LaborSummary&amp;quot; append...&lt;/p&gt;</description></item><item><title>Shape command with Where clause</title><link>https://www.infopathdev.com:443/forums/thread/26094.aspx</link><pubDate>Wed, 30 Jan 2008 23:03:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26094</guid><dc:creator>m181354</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26094.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=47&amp;PostID=26094</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Does anyone know how to use the where&amp;nbsp;clause with the shape clause? I get a error on the following code at the Where clause....&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;command += &amp;quot;{select &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;[CA1],[HOUR_DOLLAR],[DIST_NONDIST],[MASTER],&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;command += &amp;quot;[PROGRAM],[PROG_DESC],[BUY_OFF_MONTH],[CAM],[ANALYST],&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;command += &amp;quot;[WBS],[OBS],[ECAM],[APPROVED_SIGNED],&amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;[SV_HRS],[CTD_EAC_HRS],[CTD_ACWP_HRS],[BUY_OFF_DELTA_HRS],&amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;[WAS_ETC_HRS],[NOW_ETC_HRS],[DELTA_ETC_HRS],&amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;[WAS_EAC_HRS],[NOW_EAC_HRS],[EAC_DELTA_HRS],&amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;[SV_DOL],[CTD_EAC_DOL],[CTD_ACWP_DOL],[BUY_OFF_DELTA_DOL],[WAS_ETC_DOL],&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;command += &amp;quot;[NOW_ETC_DOL],[DELTA_ETC_DOL],[WAS_EAC_DOL],[NOW_EAC_DOL],[EAC_DELTA_DOL] &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;from &amp;quot;; command += &amp;quot;[LaborSummary]} as [LaborSummary] &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;where (LaborSummary.[CA1] = &amp;#39;&amp;quot; + ca1Prefix + &amp;quot;&amp;#39;) &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;append &amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;command += &amp;quot;({select &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;[CA1],[HOUR_DOLLAR],[BE],[DATE],[DISTR_HRS],[DISTR_DOL] &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;from &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;[DistributedRecords] as [DistributedRecords]} as [DistributedRecords]&amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;relate [CA1] to [CA1],[HOUR_DOLLAR] TO [HOUR_DOLLAR]) as [DistributedRecords] &amp;quot;; &lt;/p&gt;
&lt;p&gt;command += &amp;quot;order by DistributedRecords.[CA1], DistributedRecords.[BE], DistributedRecords.[DATE] &amp;quot;; &lt;/p&gt;</description></item></channel></rss>