<?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 find a polygon that a point falls within in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881396#M6776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solution that works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I still cannot explain why the join operation is not working I found that the following solution would return the correct data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DECLARE @point GEOMETRY = GEOMETRY::Point((select shape.STX as LONG from&amp;nbsp;Pointcoverage where Increment = '02048'), (select shape.STY as LAT from &lt;SPAN&gt;Pointcoverage&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt; where Increment = '02048'), 4326);&lt;BR /&gt;SELECT * from&amp;nbsp;Polycoverage where @point.STWithin(&lt;SPAN&gt;Polycoverage&amp;nbsp;&lt;/SPAN&gt;.shape) = 1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Oct 2018 10:10:25 GMT</pubDate>
    <dc:creator>JohnMay3</dc:creator>
    <dc:date>2018-10-24T10:10:25Z</dc:date>
    <item>
      <title>SQL find a polygon that a point falls within</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881391#M6771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a feature class of points and want to retrieve information about the polygon that a particular point falls within using SQL. The following query works however it does not return any results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: small;"&gt;select *&amp;nbsp;from Basins&lt;BR /&gt;join (Select Shape from&amp;nbsp;Pointlayer where Increment = 02047) as Point&lt;BR /&gt; on Basins.Shape.STWithin(Point.Shape) = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; background-color: #ffffff; font-size: small;"&gt;I have also tried STIntersects with the same result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next I created a feature class that contained a single point and the query did return the correct result. It seems to be failing at evaluation the Select statement for the join. When run by itself the select statement does return the Shape field however when embedded in the join query it fails.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Any help would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2018 17:30:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881391#M6771</guid>
      <dc:creator>JohnMay3</dc:creator>
      <dc:date>2018-10-23T17:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: SQL find a polygon that a point falls within</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881392#M6772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;STWithin won't return any results because you cannot have a polygon within a point.&amp;nbsp; Regarding STIntersects, is this versioned data you are working with?&amp;nbsp; If so, you should be querying the versioned views and not the base tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2018 20:35:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881392#M6772</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-10-23T20:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: SQL find a polygon that a point falls within</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881393#M6773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see the obvious error and rewrote the query as follows to make sure I look for the polygon that has the point within it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from Basins&lt;BR /&gt;join (Select Shape from D5 where Increment = 02047) as Point&lt;BR /&gt;on Point.Shape.STWithin(Basins.Shape) = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same result. As an aside I made a single point feature class to test and see if I got a result. At least this would let me know that the logic was evaluating correctly. Here is the query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT *&amp;nbsp;FROM BASINS &lt;BR /&gt;JOIN POINTTEST as B&lt;BR /&gt;on B.Shape.STWithin(Basins.Shape) = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This query does return the poly info. So it appears the Select statement is amiss, though it evaluates properly when run alone. The data is versioned however the versioning is set to write all edits to the Base so I don't think that is the issue, plus everything is reconciled and the delta tables are empty.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2018 20:57:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881393#M6773</guid>
      <dc:creator>JohnMay3</dc:creator>
      <dc:date>2018-10-23T20:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: SQL find a polygon that a point falls within</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881394#M6774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If Increment is a text field, which its format makes me think it is, then you need to put the value in single quotes:&amp;nbsp; Increment = '02047'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2018 22:49:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881394#M6774</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-10-23T22:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: SQL find a polygon that a point falls within</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881395#M6775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With or without quotes same result. Funny thing is if I run the following it returns the shape:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Select Shape from D5 where Increment = '02047'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;However when the select statement is used to make a recordset for the join it seems to return an empty set which of course means the join fails.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 09:01:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881395#M6775</guid>
      <dc:creator>JohnMay3</dc:creator>
      <dc:date>2018-10-24T09:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: SQL find a polygon that a point falls within</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881396#M6776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solution that works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While I still cannot explain why the join operation is not working I found that the following solution would return the correct data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DECLARE @point GEOMETRY = GEOMETRY::Point((select shape.STX as LONG from&amp;nbsp;Pointcoverage where Increment = '02048'), (select shape.STY as LAT from &lt;SPAN&gt;Pointcoverage&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt; where Increment = '02048'), 4326);&lt;BR /&gt;SELECT * from&amp;nbsp;Polycoverage where @point.STWithin(&lt;SPAN&gt;Polycoverage&amp;nbsp;&lt;/SPAN&gt;.shape) = 1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 10:10:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881396#M6776</guid>
      <dc:creator>JohnMay3</dc:creator>
      <dc:date>2018-10-24T10:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: SQL find a polygon that a point falls within</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881397#M6777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are the data layers in the same projection?&amp;nbsp; If not, from &lt;A class="link-titled" href="https://docs.microsoft.com/en-us/sql/relational-databases/spatial/spatial-reference-identifiers-srids?view=sql-server-2014" title="https://docs.microsoft.com/en-us/sql/relational-databases/spatial/spatial-reference-identifiers-srids?view=sql-server-2014"&gt;Spatial Reference Identifiers (SRIDs) | Microsoft Docs&lt;/A&gt; :&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #000000; font-family: 'Segoe UI', SegoeUI, 'Segoe WP', 'Helvetica Neue', Helvetica, Tahoma, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;However, only spatial instances with the same SRID can be used when performing operations with SQL Server spatial data methods on your data.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Segoe UI', SegoeUI, 'Segoe WP', 'Helvetica Neue', Helvetica, Tahoma, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #000000; font-family: 'Segoe UI', SegoeUI, 'Segoe WP', 'Helvetica Neue', Helvetica, Tahoma, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;If two spatial instances do not have the same SRID, the results from a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="line-height: 19px; -webkit-font-smoothing: auto; font-family: monospace, monospace; font-size: 0.8rem; border-radius: 2px; display: inline-block; padding: 3px 7px; border: 1px solid var(--grey-lighter); background-color: var(--white-bis); direction: ltr; box-sizing: inherit; color: #000000; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;geometry&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: 'Segoe UI', SegoeUI, 'Segoe WP', 'Helvetica Neue', Helvetica, Tahoma, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;CODE style="line-height: 19px; -webkit-font-smoothing: auto; font-family: monospace, monospace; font-size: 0.8rem; border-radius: 2px; display: inline-block; padding: 3px 7px; border: 1px solid var(--grey-lighter); background-color: var(--white-bis); direction: ltr; box-sizing: inherit; color: #000000; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"&gt;geography&lt;/CODE&gt;&lt;SPAN style="color: #000000; font-family: 'Segoe UI', SegoeUI, 'Segoe WP', 'Helvetica Neue', Helvetica, Tahoma, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Data Type method used on the instances will return NULL.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 12:56:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881397#M6777</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-10-24T12:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: SQL find a polygon that a point falls within</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881398#M6778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes everything is WGS84. Here is some more info.&lt;/P&gt;&lt;P&gt;I created a feature class (POINTTEST) by selecting a single point from the original feature class (ALLPOINTS). When I use the feature class that has 1 point in the join it works, even when I use the select query as part of the join. In other words the following works when executed against a point feature class that has only 1 point:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT *&amp;nbsp;FROM BASINS &lt;BR /&gt;JOIN (SELECT * FROM POINTTEST WHERE INCREMENT = '02048')as B&lt;BR /&gt;on B.Shape.STWithin(Basins.Shape) = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if I change the reference to the feature class that has a large collection of point, i.e. swapping out POINTTEST for ALLPOINTS it returns nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SELECT *&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;FROM BASINS&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;JOIN (SELECT * FROM&amp;nbsp;ALLPOINTS WHERE INCREMENT = '02048')as B&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on B.Shape.STWithin(Basins.Shape) = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 13:13:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881398#M6778</guid>
      <dc:creator>JohnMay3</dc:creator>
      <dc:date>2018-10-24T13:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: SQL find a polygon that a point falls within</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881399#M6779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WGS84 is a datum, not a projection, it is possible to have datasets with the same datum but different projections.&amp;nbsp; What do the following return?&lt;/P&gt;&lt;PRE class="line-numbers language-sql"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;Select&lt;/SPAN&gt; Shape&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;STSrid &lt;SPAN class="keyword token"&gt;FROM&lt;/SPAN&gt; POINTTEST &lt;SPAN class="keyword token"&gt;WHERE&lt;/SPAN&gt; INCREMENT &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'02048'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE class="line-numbers language-sql"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;Select&lt;/SPAN&gt; Shape&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;STSrid &lt;SPAN class="keyword token"&gt;FROM&lt;/SPAN&gt; ALLPOINTS &lt;SPAN class="keyword token"&gt;WHERE&lt;/SPAN&gt; INCREMENT &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'02048'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 16:17:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881399#M6779</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-10-24T16:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: SQL find a polygon that a point falls within</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881400#M6780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It just gets more interesting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit;"&gt;Select&lt;/SPAN&gt; Shape&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;STSrid &lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit;"&gt;FROM&lt;/SPAN&gt; POINTTEST &lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit;"&gt;WHERE&lt;/SPAN&gt; INCREMENT &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #3d3d3d;"&gt;'02048': - Result&amp;nbsp;= 4326&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit;"&gt;Select&lt;/SPAN&gt; Shape&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;STSrid &lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit;"&gt;FROM&lt;/SPAN&gt; ALLPOINTS &lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit;"&gt;WHERE&lt;/SPAN&gt; INCREMENT &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="border: 0px; font-weight: inherit;"&gt;'02048': - Result is NULL&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then here is what ArcGIS reports for each feature class.&lt;/P&gt;&lt;P&gt;ALLPOINT&lt;BR /&gt;Geographic Coordinate System: GCS_WGS_1984&lt;BR /&gt;Datum: D_WGS_1984&lt;BR /&gt;Prime Meridian: Greenwich&lt;BR /&gt;Angular Unit: Degree&lt;/P&gt;&lt;P&gt;POINTTEST&lt;BR /&gt;Geographic Coordinate System: GCS_WGS_1984&lt;BR /&gt;Datum: D_WGS_1984&lt;BR /&gt;Prime Meridian: Greenwich&lt;BR /&gt;Angular Unit: Degree&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore the feature class named POINTTEST was created by selecting a single point from ALLPOINTS and exporting it to a new Feature Class which means inheritance should have applied.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 18:57:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881400#M6780</guid>
      <dc:creator>JohnMay3</dc:creator>
      <dc:date>2018-10-24T18:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: SQL find a polygon that a point falls within</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881401#M6781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am guessing ALLPOINTS was loaded into SQL Server not using Esri tools and then later registered with the enterprise geodatabase.&amp;nbsp; The ALLPOINTS layer was created from points, but whoever created those points did not associate an SRID with the points, hence why it is NULL.&amp;nbsp; When the table was registered with the EGDB, a spatial reference was assigned, but assigning the spatial reference updates metadata, it doesn't go back and add it to every record in the table.&amp;nbsp; When you selected the point and exported to POINTTEST, ArcGIS took the assigned spatial reference and properly assigned it to the point when it created it in the new feature class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If ALLPOINTS is registered with the EGDB, I believe you will not be allowed to update the SRID outside of ArcGIS.&amp;nbsp; The easiest way to get the correct SRID assigned to each of the geometries in ALLPOINTS is to export the entire feature class back into the EGDB, delete the old one, and then you can rename the new one back to ALLPOINTS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2018 13:50:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881401#M6781</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-10-25T13:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: SQL find a polygon that a point falls within</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881402#M6782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep. I finally figured that out around 6:00 this morning. Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2018 13:54:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-find-a-polygon-that-a-point-falls-within/m-p/881402#M6782</guid>
      <dc:creator>JohnMay3</dc:creator>
      <dc:date>2018-10-25T13:54:45Z</dc:date>
    </item>
  </channel>
</rss>

