<?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: How to use GEOGRAPHY or GEOMETRY function in a SQL for Register as Geodatabase tool in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/how-to-use-geography-or-geometry-function-in-a-sql/m-p/1580953#M9490</link>
    <description>&lt;P&gt;Hi George,&lt;/P&gt;&lt;P&gt;Thank you! I was able to register the following SQL view:&lt;BR /&gt;&lt;BR /&gt;Here is what worked:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SELECT ISNULL(CAST(ROW_NUMBER() OVER (ORDER BY [Field1] ASC) AS int), 0) AS [ID], Field1, Latitude, Longitude,&lt;BR /&gt;geometry::STGeomFromText('POINT(' + CONVERT(varchar(20), CORE.global.Places.Longitude) + ' ' + CONVERT(varchar(20), CORE.global.Places.Latitude) + ')', 4326) AS Shape&lt;BR /&gt;FROM CORE.global.Places&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2025 18:28:39 GMT</pubDate>
    <dc:creator>MatthewTsui5</dc:creator>
    <dc:date>2025-01-31T18:28:39Z</dc:date>
    <item>
      <title>How to use GEOGRAPHY or GEOMETRY function in a SQL for Register as Geodatabase tool</title>
      <link>https://community.esri.com/t5/geodatabase-questions/how-to-use-geography-or-geometry-function-in-a-sql/m-p/1580865#M9486</link>
      <description>&lt;P&gt;Hi Esri Community,&lt;/P&gt;&lt;P&gt;Does anybody recommend how to convert latitude and longitude columns using the GEOGRAPHY and GEOMETRY functions in a SQL view, which will source a Registered Feature Class within an Enterprise Geodatabase?&lt;/P&gt;&lt;P&gt;Here is my workflow:&lt;/P&gt;&lt;P&gt;1. Create SQL view in SSMS in SQL Server 2019 database. Tables are in another SQL Server 2019 database.&lt;/P&gt;&lt;P&gt;2. In ArcGIS Pro 2.9.5, use Create Database View tool&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Use Register with Geodatabase (Database Management) tool?&lt;/P&gt;&lt;P&gt;Unfortunately, I receive the error message: "ERROR 160236: The operation is not supported by this implementation."&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My troubleshooting narrowed the issue down to the Shape Field paramter rin the Register with Geodatabase tool.&lt;/STRONG&gt; This column is sourced from the geometry SQL function., which was created in the SQL VIEW. tried 2 SQL function:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;geography::Point(CORE.global.ProfitCenters.Latitude, CORE.global.ProfitCenters.Longitude, 4326) AS geographypoint, geometry::Point(CORE.global.ProfitCenters.Latitude, CORE.global.ProfitCenters.Longitude, 4326) AS geometrypoint&lt;/LI&gt;&lt;LI&gt;geography::Point(CORE.global.ProfitCenters.Latitude, CORE.global.ProfitCenters.Longitude, 4326) AS geographypoint,&lt;BR /&gt;geometry::Point(CORE.global.ProfitCenters.Latitude, CORE.global.ProfitCenters.Longitude, 4326) AS geometrypoint&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 31 Jan 2025 16:11:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/how-to-use-geography-or-geometry-function-in-a-sql/m-p/1580865#M9486</guid>
      <dc:creator>MatthewTsui5</dc:creator>
      <dc:date>2025-01-31T16:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use GEOGRAPHY or GEOMETRY function in a SQL for Register as Geodatabase tool</title>
      <link>https://community.esri.com/t5/geodatabase-questions/how-to-use-geography-or-geometry-function-in-a-sql/m-p/1580896#M9489</link>
      <description>&lt;P&gt;If you change the "geometrypoint" field to "shape" then try to register, does that work?&lt;/P&gt;&lt;P&gt;**************************************************************************&lt;/P&gt;&lt;P&gt;Here is a query to take x/y in a table and create a shape field.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;alter table [data].[CADRecordsData_Schema2] add shape as geometry::STGeomFromText('POINT('+convert(varchar(20),xCoord)+' '+convert(varchar(20),yCoord)+')',4326)&lt;/P&gt;&lt;P&gt;4326 = SRID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Added the spatial point shape column from the X/Y data in the table:&lt;/P&gt;&lt;P&gt;&lt;A href="https://gis.stackexchange.com/questions/21108/create-a-geography-geometry-column-from-x-and-y-fields-sql-server-2008" target="_blank" rel="noopener"&gt;https://gis.stackexchange.com/questions/21108/create-a-geography-geometry-column-from-x-and-y-fields-sql-server-2008&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 17:16:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/how-to-use-geography-or-geometry-function-in-a-sql/m-p/1580896#M9489</guid>
      <dc:creator>George_Thompson</dc:creator>
      <dc:date>2025-01-31T17:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use GEOGRAPHY or GEOMETRY function in a SQL for Register as Geodatabase tool</title>
      <link>https://community.esri.com/t5/geodatabase-questions/how-to-use-geography-or-geometry-function-in-a-sql/m-p/1580953#M9490</link>
      <description>&lt;P&gt;Hi George,&lt;/P&gt;&lt;P&gt;Thank you! I was able to register the following SQL view:&lt;BR /&gt;&lt;BR /&gt;Here is what worked:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SELECT ISNULL(CAST(ROW_NUMBER() OVER (ORDER BY [Field1] ASC) AS int), 0) AS [ID], Field1, Latitude, Longitude,&lt;BR /&gt;geometry::STGeomFromText('POINT(' + CONVERT(varchar(20), CORE.global.Places.Longitude) + ' ' + CONVERT(varchar(20), CORE.global.Places.Latitude) + ')', 4326) AS Shape&lt;BR /&gt;FROM CORE.global.Places&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 18:28:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/how-to-use-geography-or-geometry-function-in-a-sql/m-p/1580953#M9490</guid>
      <dc:creator>MatthewTsui5</dc:creator>
      <dc:date>2025-01-31T18:28:39Z</dc:date>
    </item>
  </channel>
</rss>

