<?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: SQL Error Shape.STContains is not allowed in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802773#M2695</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SQL Server 2014 and Arcgis server 10.3.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Sep 2016 19:37:54 GMT</pubDate>
    <dc:creator>DionO_Reilly</dc:creator>
    <dc:date>2016-09-15T19:37:54Z</dc:date>
    <item>
      <title>SQL Error Shape.STContains is not allowed</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802771#M2693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a SQL view to count the number of point features in a polygon. &amp;nbsp;The following code works when run in a SQL Query, however when I try to create a view using the code I get "Shape.STContains is not allowed, and the column name dbo could not be found or is ambiguous"&lt;/P&gt;&lt;P&gt;SELECT POLYGON.NAME, Count(*)&lt;BR /&gt;from Point&amp;nbsp;JOIN&lt;BR /&gt;POLYGON&lt;BR /&gt;On POLYGON.Shape.STContains(POINT.SHAPE) = 1&lt;BR /&gt;GROUP BY POLYGON.NAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any assistance would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 18:07:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802771#M2693</guid>
      <dc:creator>DionO_Reilly</dc:creator>
      <dc:date>2016-09-15T18:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Error Shape.STContains is not allowed</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802772#M2694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is always helpful to provide information on DBMS platform and version, and ArcGIS products and versions, if applicable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 18:26:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802772#M2694</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-09-15T18:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Error Shape.STContains is not allowed</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802773#M2695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SQL Server 2014 and Arcgis server 10.3.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 19:37:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802773#M2695</guid>
      <dc:creator>DionO_Reilly</dc:creator>
      <dc:date>2016-09-15T19:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Error Shape.STContains is not allowed</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802774#M2696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you trying to create the view from ArcCatalog or from within another database client, like SQL Server Management Studio?&amp;nbsp; If the former, have you tried it from a different database client, a non-Esri one?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 20:45:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802774#M2696</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-09-15T20:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Error Shape.STContains is not allowed</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802775#M2697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Creating in SQL management studio. It displays correct results in SQL query but when try to make the view it throws that error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2016 01:52:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802775#M2697</guid>
      <dc:creator>DionO_Reilly</dc:creator>
      <dc:date>2016-09-16T01:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Error Shape.STContains is not allowed</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802776#M2698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please tell me you managed to solve this one?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then immediately thereafter tell me how you did it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have reinstalled servers and .net systems and this one has baffled me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks hugely in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 16:06:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802776#M2698</guid>
      <dc:creator>MartinRowe1</dc:creator>
      <dc:date>2017-03-14T16:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Error Shape.STContains is not allowed</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802777#M2699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE style="color: #242729; background-color: #ffffff; border: 0px; font-size: 13px;"&gt;&lt;TBODY style="border: 0px; font-size: 13px;"&gt;&lt;TR style="border: 0px; font-size: 13px;"&gt;&lt;TD class="" style="border: 0px; font-size: 13px; padding: 0px 15px 0px 0px;"&gt;&lt;DIV class="" style="border: 0px; font-size: 13px;"&gt;&lt;A style="color: #0077cc; border: 0px; text-indent: -9999em; font-size: 1px; margin: 0px auto 10px;" title="This answer is not useful"&gt;down vote&lt;/A&gt;&lt;A data-title-accept="Click to accept this answer because it solved your problem or was the most helpful in finding your solution (click again to undo)" data-title-unaccept="Click to undo acceptance of this answer; you accepted this answer " data-verb-accept="accept" data-verb-unaccept="unaccept" style="color: #0077cc; border: 0px; text-indent: -9999em; font-size: 1px; margin: 0px auto 10px;" title="Click to accept this answer because it solved your problem or was the most helpful in finding your solution (click again to undo)"&gt;accept&lt;/A&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;TD class="" style="border: 0px; font-size: 13px;"&gt;&lt;DIV class="" style="border: 0px; margin: 0px 0px 5px;"&gt;&lt;P style="border: 0px; margin: 0px 0px 1em;"&gt;YAAYYYYYYY. Got it.&lt;/P&gt;&lt;P style="border: 0px; margin: 0px 0px 1em;"&gt;It seems that the STContains function won't operate with a DBO schema in front of the field name.&lt;/P&gt;&lt;P style="border: 0px; margin: 0px 0px 1em;"&gt;If you add the database name to the query it works. Should look like this.&lt;/P&gt;&lt;P style="border: 0px; margin: 0px 0px 1em;"&gt;&lt;CODE style="border: 0px; font-size: 13px; padding: 1px 5px;"&gt;USE MyDatabase &lt;/CODE&gt;&lt;/P&gt;&lt;P style="border: 0px; margin: 0px 0px 1em;"&gt;&lt;CODE style="border: 0px; font-size: 13px; padding: 1px 5px;"&gt;Select dbo.PointTab.*, dbo.PolyTab.Name from dbo.PointTab &lt;/CODE&gt;&lt;/P&gt;&lt;P style="border: 0px; margin: 0px 0px 1em;"&gt;&lt;CODE style="border: 0px; font-size: 13px; padding: 1px 5px;"&gt;Inner Join dbo.PolyTab &lt;/CODE&gt;&lt;/P&gt;&lt;P style="border: 0px; margin: 0px 0px 1em;"&gt;&lt;CODE style="border: 0px; font-size: 13px; padding: 1px 5px;"&gt;On PolyTab.GeometryCol.STContains(dbo.PointTab.GeometryCol) = 1&lt;/CODE&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Mar 2017 10:23:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-error-shape-stcontains-is-not-allowed/m-p/802777#M2699</guid>
      <dc:creator>MartinRowe1</dc:creator>
      <dc:date>2017-03-19T10:23:21Z</dc:date>
    </item>
  </channel>
</rss>

