<?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: Use GROUP BY in SelectLayerByAttribute  where_clause ?? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57213#M1551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am using a Personal Geodatabase and i am not able to make out how i can return more than one value as of now, in the query. request help to modify my existing query in such a way that it suits where_clause of SelectLayerbyAttributes. As a beginner in arcobjects I honestly do not know what Summary statistics is. &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Pavan&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Summary Statistics is a geoprocessing tool, not ArcObjects per se, although it can be accessed through ArcObjects.&amp;nbsp; Since it is a personal geodatabase, build the query in Access and look at the sql of the subqueries.&amp;nbsp; If you can make it work there it should translate to the query.&amp;nbsp; At least that is how I would approach it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Aug 2013 13:08:58 GMT</pubDate>
    <dc:creator>RichardFairhurst</dc:creator>
    <dc:date>2013-08-27T13:08:58Z</dc:date>
    <item>
      <title>Use GROUP BY in SelectLayerByAttribute  where_clause ??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57208#M1546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am developing a stand alone C# Map control application using ArcGIS Engine 10.1. I am trying to select features in a point feature class using "SelectLayerByAttribute" class which requires me to use to use GROUP BY keyword.. The Query goes something like this..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT LONGITUDE, LATITUDE, COUNT(LONGITUDE) FROM LAYER123 GROUP BY LONGITUDE,LATITUDE, COUNT(LONGITUDE) HAVING COUNT(LONGITUDE) &amp;gt; 5;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The idea is to select all the features that have been plotted more than 5 times for a given longitude and latitude. My problem here is that I am unable to execute the above query in SelectLayerByAttribute.where_clause, is there a way that i can execute GROUP BY statements to select features in a given layer. Also let me know if there is a workaround for this..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Santosh Pavan Kumar N&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2013 06:53:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57208#M1546</guid>
      <dc:creator>Santosh_Pavan_KumarNukala</dc:creator>
      <dc:date>2013-08-23T06:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Use GROUP BY in SelectLayerByAttribute  where_clause ??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57209#M1547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;I am developing a stand alone C# Map control application using ArcGIS Engine 10.1. I am trying to select features in a point feature class using "SelectLayerByAttribute" class which requires me to use to use GROUP BY keyword.. The Query goes something like this..&lt;BR /&gt;&lt;BR /&gt;SELECT LONGITUDE, LATITUDE, COUNT(LONGITUDE) FROM LAYER123 GROUP BY LONGITUDE,LATITUDE HAVING COUNT(LONGITUDE) &amp;gt; 5;&lt;BR /&gt;&lt;BR /&gt;The idea is to select all the features that have been plotted more than 5 times for a given longitude and latitude. My problem here is that I am unable to execute the above query in SelectLayerByAttribute.where_clause, is there a way that i can execute GROUP BY statements to select features in a given layer. Also let me know if there is a workaround for this..&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards,&lt;BR /&gt;Santosh Pavan Kumar N&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone throw some light on this please.. need a solution or a workaround.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 05:19:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57209#M1547</guid>
      <dc:creator>Santosh_Pavan_KumarNukala</dc:creator>
      <dc:date>2013-08-26T05:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Use GROUP BY in SelectLayerByAttribute  where_clause ??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57210#M1548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A similar post was left unanswered &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/29621-Selection-QUERY-duplicits?highlight=GROUP+BY"&gt;http://forums.arcgis.com/threads/29621-Selection-QUERY-duplicits?highlight=GROUP+BY&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; , I had tried to do a workaround as mentioned in the link by using&amp;nbsp; WHERE .. IN ( Select .. GROUP BY .. HAVING ..) but the problem I need to perform GROUP BY on multiple fields and need to Select Longitude and Latitude in Subquery, hence i cannot use "WHERE Longitude, Latitude IN" as you can use only one field while using IN.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Request any kind of help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pavan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 09:12:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57210#M1548</guid>
      <dc:creator>Santosh_Pavan_KumarNukala</dc:creator>
      <dc:date>2013-08-26T09:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Use GROUP BY in SelectLayerByAttribute  where_clause ??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57211#M1549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;A similar post was left unanswered &lt;A href="http://forums.arcgis.com/threads/29621-Selection-QUERY-duplicits?highlight=GROUP+BY"&gt;http://forums.arcgis.com/threads/29621-Selection-QUERY-duplicits?highlight=GROUP+BY&lt;/A&gt;&amp;nbsp; , I had tried to do a workaround as mentioned in the link by using&amp;nbsp; WHERE .. IN ( Select .. GROUP BY .. HAVING ..) but the problem I need to perform GROUP BY on multiple fields and need to Select Longitude and Latitude in Subquery, hence i cannot use "WHERE Longitude, Latitude IN" as you can use only one field while using IN.&lt;BR /&gt;&lt;BR /&gt;Request any kind of help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Pavan&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Unless you use a Personal Geodatabase (Access) or an SDE database like SQL Server or Oracle, GROUP BY can only return one value and cannot be correlated to any other fields in a table (I.e., the max is for every record in the entire table).&amp;nbsp; A file geodatabase or shapefile do not support the subquery syntax you want to use.&amp;nbsp; For those types of databases you must use the Summary Statistics tool and a join to do the selection based on the joined grouped summary values.&amp;nbsp; A multi-field join would have to use the Make Query Table tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Generally I breakdown and concatenate the multiple fields and use the Summary Statistics to do the selection or data transfer through a standard join.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2013 13:35:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57211#M1549</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-08-26T13:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Use GROUP BY in SelectLayerByAttribute  where_clause ??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57212#M1550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Unless you use a Personal Geodatabase (Access) or an SDE database like SQL Server or Oracle, GROUP BY can only return one value and cannot be correlated to any other fields in a table (I.e., the max is for every record in the entire table).&amp;nbsp; A file geodatabase or shapefile do not support the subquery syntax you want to use.&amp;nbsp; For those types of databases you must use the Summary Statistics tool and a join to do the selection based on the joined grouped summary values.&amp;nbsp; A multi-field join would have to use the Make Query Table tool.&lt;BR /&gt;&lt;BR /&gt;Generally I breakdown and concatenate the multiple fields and use the Summary Statistics to do the selection or data transfer through a standard join.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using a Personal Geodatabase and i am not able to make out how i can return more than one value as of now, in the query. request help to modify my existing query in such a way that it suits where_clause of SelectLayerbyAttributes. As a beginner in arcobjects I honestly do not know what Summary statistics is. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pavan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 09:24:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57212#M1550</guid>
      <dc:creator>Santosh_Pavan_KumarNukala</dc:creator>
      <dc:date>2013-08-27T09:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Use GROUP BY in SelectLayerByAttribute  where_clause ??</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57213#M1551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am using a Personal Geodatabase and i am not able to make out how i can return more than one value as of now, in the query. request help to modify my existing query in such a way that it suits where_clause of SelectLayerbyAttributes. As a beginner in arcobjects I honestly do not know what Summary statistics is. &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Pavan&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Summary Statistics is a geoprocessing tool, not ArcObjects per se, although it can be accessed through ArcObjects.&amp;nbsp; Since it is a personal geodatabase, build the query in Access and look at the sql of the subqueries.&amp;nbsp; If you can make it work there it should translate to the query.&amp;nbsp; At least that is how I would approach it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 13:08:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/use-group-by-in-selectlayerbyattribute-nbsp-where/m-p/57213#M1551</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-08-27T13:08:58Z</dc:date>
    </item>
  </channel>
</rss>

