 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Query for records that have certain numbers in them</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/query-for-records-that-have-certain-numbers-in-them/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/query-for-records-that-have-certain-numbers-in-them/</link>
	<description></description>
	<lastBuildDate>Tue, 21 May 2013 23:11:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tlsanders1</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/query-for-records-that-have-certain-numbers-in-them/#comment-104479</link>
		<dc:creator>tlsanders1</dc:creator>
		<pubDate>Mon, 05 Mar 2012 16:54:07 +0000</pubDate>
		<guid isPermaLink="false">#comment-104479</guid>
		<description><![CDATA[This is not real elegant, but I think it does what you asked for.  In a query, add the table and each of the four fields.  Add a new column to the query with an immediate IF such as &quot;=IIF(field1=94,1,0)&quot;.  That column will now have a 1 if field 1 matches your criteria or a 0 if not.  Make three more columns in the query for the other three criteria.  Now add a column that totals those four, &quot;=expr1+expr2+expr3+expr4&quot;  This column now lists for each record, how many of the criteria are matched.  I couldn&#039;t get that column to filter or sort, so I created a separate query that used the first query for data, and I could set in the criteria line of expr5, &quot;&gt;1&quot; and I could sort it.  So, that query lists the records from the original data that meet 2 or more of the criteria and sorts the records that meet 4 criteria, 3 criteria, etc.]]></description>
		<content:encoded><![CDATA[<p>This is not real elegant, but I think it does what you asked for.  In a query, add the table and each of the four fields.  Add a new column to the query with an immediate IF such as &#8220;=IIF(field1=94,1,0)&#8221;.  That column will now have a 1 if field 1 matches your criteria or a 0 if not.  Make three more columns in the query for the other three criteria.  Now add a column that totals those four, &#8220;=expr1+expr2+expr3+expr4&#8243;  This column now lists for each record, how many of the criteria are matched.  I couldn&#8217;t get that column to filter or sort, so I created a separate query that used the first query for data, and I could set in the criteria line of expr5, &#8220;&gt;1&#8243; and I could sort it.  So, that query lists the records from the original data that meet 2 or more of the criteria and sorts the records that meet 4 criteria, 3 criteria, etc.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.029 seconds using memcached
Object Caching 267/273 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-21 23:27:18 -->