<?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: Query with non-blank records</title><link>https://www.infopathdev.com:443/forums/thread/25432.aspx</link><pubDate>Sat, 05 Jan 2008 00:59:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25432</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25432.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=25432</wfw:commentRss><description>&lt;p&gt;Yes, editing the data connection SQL command permanently changes the default query. However, the query command is available to be updated at any time using code before you query.&lt;/p&gt;
&lt;p&gt;When using LIKE, you need to use the &amp;quot;%&amp;quot;s. The LIKE clause *is* your wildcard...&lt;/p&gt;
&lt;p&gt;So if you use:&lt;/p&gt;
&lt;p&gt;SELECT * FROM table WHERE column LIKE &amp;#39;%an%&amp;#39;&lt;/p&gt;
&lt;p&gt;This will select any row where &amp;#39;column&amp;#39; has the string &amp;quot;an&amp;quot; in it. This is not case-sensitive. Note the use of the single quote character around the &amp;quot;%&amp;quot;s.&lt;/p&gt;
&lt;p&gt;&amp;quot;*&amp;quot; by itself is not a wild card in SQL. But using LIKE with % give you that.&lt;/p&gt;</description></item><item><title>Re: Query with non-blank records</title><link>https://www.infopathdev.com:443/forums/thread/25391.aspx</link><pubDate>Thu, 03 Jan 2008 20:27:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25391</guid><dc:creator>troy0118</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25391.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=25391</wfw:commentRss><description>&lt;p&gt;Thanks Greg. The method you suggested is a permanent one. However, it is not necessary to be that. I also tried a wildcard query by Microsoft &lt;a href="http://support.microsoft.com/kb/826992"&gt;http://support.microsoft.com/kb/826992&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is the sql command in the above article, but it doesn&amp;#39;t&amp;nbsp;do the wildcard function. The query will only work when I give the exact words.&lt;br /&gt;strMySQLCommand = strMySQLCommand + &amp;quot;([ABC].[Comments] LIKE \&amp;quot;&amp;quot; + strComments + &amp;quot;\&amp;quot;)&amp;quot;;&lt;/p&gt;
&lt;p&gt;I did a little bit research again, and found out that someone suggested to put &amp;quot;%&amp;quot; and the query works.&lt;br /&gt;strMySQLCommand = strMySQLCommand + &amp;quot;([ABC].[Comments] LIKE \&amp;quot;%&amp;quot; + strComments + &amp;quot;%\&amp;quot;)&amp;quot;;&lt;br /&gt;Howerver, when I type &amp;quot;*&amp;quot; the query returns the comments that contain &amp;quot;*&amp;quot;&lt;br /&gt;Again, the wildcard is not functioning.&lt;/p&gt;
&lt;p&gt;Pleace advice.&lt;/p&gt;</description></item><item><title>Re: Query with non-blank records</title><link>https://www.infopathdev.com:443/forums/thread/25359.aspx</link><pubDate>Wed, 02 Jan 2008 23:49:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25359</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25359.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=25359</wfw:commentRss><description>&lt;p&gt;You can directly edit the SQL Command in your SQL data connection to add your WHERE clause.&lt;/p&gt;</description></item><item><title>Query with non-blank records</title><link>https://www.infopathdev.com:443/forums/thread/25356.aspx</link><pubDate>Wed, 02 Jan 2008 22:12:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25356</guid><dc:creator>troy0118</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25356.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=25356</wfw:commentRss><description>&lt;p&gt;How do I pull the records that have values?&lt;/p&gt;
&lt;p&gt;In Access, I can do:&lt;/p&gt;
&lt;p&gt;SELECT * FROM ABC WHERE ((Not (ABC.Comments)=&amp;quot;blank&amp;quot;));&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;This SQL Command will give me all records that have values in Comments field. How do I make it work via Infopath?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description></item></channel></rss>