<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Need help with a difinition query in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190743#M10778</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The OP is working with shape files, or at least indicates so, which means CAST won't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jun 2016 16:49:49 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2016-06-22T16:49:49Z</dc:date>
    <item>
      <title>Need help with a definition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190740#M10775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a point shapefile with 2 columns. Each column contains numbers relating to price increases of a service. One column is how much the price has risen by (£) and the second column is what percentage it has risen by, compared to the original price.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the layer in ArcMap to only display points where the price rise is above 10 (£) AND the percentage is over 50 (%).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the definition query tab, perhaps it would look like:&lt;/P&gt;&lt;P&gt;"PRICE_RISE" &amp;gt; 10 AND "PERCENTAGE_RISE" &amp;gt; 50&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however, this returns an invalid sql statement...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2016 15:54:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190740#M10775</guid>
      <dc:creator>TheoFaull</dc:creator>
      <dc:date>2016-06-22T15:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a difinition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190741#M10776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are both fields numeric, or is it possible one or both are text? Did you use the definition query buttons to fill it it, or did you type it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2016 16:06:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190741#M10776</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2016-06-22T16:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a difinition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190742#M10777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Theo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may be able to ditch the double quotes around field names. Also, (as &lt;A href="https://community.esri.com/migrated-users/81858"&gt;Darren Wiens&lt;/A&gt;​ mentioned), those could be text fields. You could use &lt;A href="https://msdn.microsoft.com/en-us/library/aa226054(SQL.80).aspx"&gt;CAST&lt;/A&gt; to convert those values to integer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Micah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2016 16:27:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190742#M10777</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2016-06-22T16:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a difinition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190743#M10778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The OP is working with shape files, or at least indicates so, which means CAST won't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2016 16:49:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190743#M10778</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-06-22T16:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a difinition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190744#M10779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/19932"&gt;Darren Wiens&lt;/A&gt;​ The price rise field is a 'double' and the percentage rise is a 'string'. The fields are&amp;nbsp; not filled by a query (I didn't know this was possible?). The shapefile is actually a an export from another shapefile which had a CSV file joined to it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 08:17:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190744#M10779</guid>
      <dc:creator>TheoFaull</dc:creator>
      <dc:date>2016-06-23T08:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a difinition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190745#M10780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK I did it with:&lt;/P&gt;&lt;P&gt;"PRICE_RISE" &amp;gt; 10 AND "PERCENTAGE_RISE" &amp;gt; '50'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The string field needed single quotes around the value, but the double field didn't. I didn't realise different field stypes required different levels of quotation marks. I wonder if there is an ESRI help article somewhere that explains it all!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 08:24:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190745#M10780</guid>
      <dc:creator>TheoFaull</dc:creator>
      <dc:date>2016-06-23T08:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a definition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190746#M10781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are certainly references in the help file&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/map/working-with-layers/sql-reference-for-query-expressions-used-in-arcgis.htm" title="http://desktop.arcgis.com/en/arcmap/latest/map/working-with-layers/sql-reference-for-query-expressions-used-in-arcgis.htm"&gt;SQL reference for query expressions used in ArcGIS—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;and they contain references as to how the field names are to be treated depending upon whether shapefiles or gdb's are being queried and how to handle numbers and text&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 08:31:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190746#M10781</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-06-23T08:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a definition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190747#M10782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to check your results. The string field will not produce the results you.d expect. For example you asked for &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"PERCENTAGE_RISE" &amp;gt; '50' what you are probably getting is 50,51...6,60,61...7...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 12:08:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190747#M10782</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-06-23T12:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a definition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190748#M10783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, but why would 'greater than 50' return results like 6 or 7?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checking my data, it seems to have only values greater than 50, but maybe I got lucky and didn't have any values as 6, 7, 8, or 9...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 13:16:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190748#M10783</guid>
      <dc:creator>TheoFaull</dc:creator>
      <dc:date>2016-06-23T13:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a definition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190749#M10784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Due to an alpha numeric sort versus a numeric sort. alphanumeric = 1 10 11 12 13 14 15 16 17 18 19 2 20 21 ..., numeric sort = 1 2 3 4 5 6 7 8 9 10 ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 13:30:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190749#M10784</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-06-23T13:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a definition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190750#M10785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I meant, you should open the query builder when you build a definition query and use the buttons to make the query. This will help you use proper quotes around field names and field values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/208728_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 16:39:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190750#M10785</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2016-06-23T16:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a definition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190751#M10786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another definition query question. My point shapefile contains a string field ("Tag") populated with values: &lt;/P&gt;&lt;P&gt;'AdHoc'&lt;/P&gt;&lt;P&gt;'AdHoc[followed by ref numbers]'&lt;/P&gt;&lt;P&gt;'Adhoc'&lt;/P&gt;&lt;P&gt;'Adhoc[followed by ref numbers]'&lt;/P&gt;&lt;P&gt;'TreeSurv'&lt;/P&gt;&lt;P&gt;etc. etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to split the layer so one only displayed points where the "Tag" field contains only AdHoc/Adhoc values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Tag" LIKE 'AdHoc%' found all these values but it missed out 'Adhoc'. Ok so it's case sensitive this query business. So...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Tag" LIKE 'AdHoc%' AND "TAG" LIKE 'Adhoc%' BUT this returned no results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 14:25:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190751#M10786</guid>
      <dc:creator>TheoFaull</dc:creator>
      <dc:date>2016-06-29T14:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a definition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190752#M10787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The use of AND requires both to be true for it to return anything. You could try OR or &lt;STRONG style="color: #3d3d3d; font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"Tag" LIKE 'Ad_oc%'&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 14:33:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190752#M10787</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-06-29T14:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a definition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190753#M10788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok so it turns out replacing AND with OR fixes this. However this is the confusing bit...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have another layer with a definition query which excludes certain values being shown, but uses the AND function. &lt;STRONG&gt;and it works&lt;/STRONG&gt;!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"OWNERNAME" &amp;lt;&amp;gt; 'S_HOUSING' AND "OWNERNAME" &amp;lt;&amp;gt; 'R_LAND' AND "OWNERNAME" &amp;lt;&amp;gt; 'HOUSING ASSOCIATION'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This query &lt;EM&gt;successfully&lt;/EM&gt; filters our any entries where the OWNERNAME field contains S_HOUSING, or R_LAND &lt;SPAN style="text-decoration: underline;"&gt;or&lt;/SPAN&gt; HOUSING ASSOCIATION.&lt;/P&gt;&lt;P&gt;The OWNERNAME field is a string too FYI. How come AND works in this instance but not in the previous?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 14:33:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190753#M10788</guid>
      <dc:creator>TheoFaull</dc:creator>
      <dc:date>2016-06-29T14:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a definition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190754#M10789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;excellent help again &lt;A href="https://community.esri.com/migrated-users/16710"&gt;Wes Miller&lt;/A&gt;​ . see my post below though... hmmm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 14:34:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190754#M10789</guid>
      <dc:creator>TheoFaull</dc:creator>
      <dc:date>2016-06-29T14:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with a definition query</title>
      <link>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190755#M10790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this case &amp;lt;&amp;gt; means does not equal. So if &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"OWNERNAME"&amp;nbsp; does not equal &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;'S_HOUSING' &lt;/SPAN&gt;AND &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"OWNERNAME" does not equal &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;'HOUSING ASSOCIATION' when both queries evaluate to true then select it.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 15:08:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/need-help-with-a-definition-query/m-p/190755#M10790</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-06-29T15:08:22Z</dc:date>
    </item>
  </channel>
</rss>

