<?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: Issues adding a spatial reference to a sql view in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/issues-adding-a-spatial-reference-to-a-sql-view/m-p/1196126#M57799</link>
    <description>&lt;P&gt;What about using a SET statement after the view has been defined?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SET SHAPE = &lt;STRONG&gt;geometry::Polygon(26910)&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jul 2022 21:04:31 GMT</pubDate>
    <dc:creator>RyanTucker</dc:creator>
    <dc:date>2022-07-26T21:04:31Z</dc:date>
    <item>
      <title>Issues adding a spatial reference to a sql view</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/issues-adding-a-spatial-reference-to-a-sql-view/m-p/1195586#M57713</link>
      <description>&lt;P&gt;I'm looking at adding a spatial reference to my database view, I'm fairly new to SQL and not entirely sure the syntax I need to use.&lt;/P&gt;&lt;P&gt;My query currently looks like this:&lt;/P&gt;&lt;P&gt;SELECT UniqueID, CASE_NUMBER, PROJECT_NAME, APPLICANT, SUB_TYPE_DEFAULT_TEXT, LOCATION, SUB_TYPE_DESC, STATUS_DESC, DATE_ACCEPTED, IMAGE_URL, PDF_URL, STATUS_COMMENTS, PUBLIC_VIEW, SHAPE&lt;/P&gt;&lt;P&gt;FROM *MYDATA**&lt;/P&gt;&lt;P&gt;Query works fine but the base feature class that the tables are pulling from doesn't have a coordinate system.&lt;/P&gt;&lt;P&gt;I was thinking that I could define the SHAPE as the SRID I am looking for, so something like this:&lt;/P&gt;&lt;P&gt;SELECT UniqueID, CASE_NUMBER, PROJECT_NAME, APPLICANT, SUB_TYPE_DEFAULT_TEXT, LOCATION, SUB_TYPE_DESC, STATUS_DESC, DATE_ACCEPTED, IMAGE_URL, PDF_URL, STATUS_COMMENTS, PUBLIC_VIEW, &lt;STRONG&gt;geometry::Polygon(26910) AS SHAPE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM *MYDATA**&lt;/P&gt;&lt;P&gt;geometry:Polygon(26910)&lt;/P&gt;&lt;P&gt;That threw back a syntax error and not entirely should how to proceed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be much appreciated!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 19:41:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/issues-adding-a-spatial-reference-to-a-sql-view/m-p/1195586#M57713</guid>
      <dc:creator>KevinDurkee</dc:creator>
      <dc:date>2022-07-25T19:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Issues adding a spatial reference to a sql view</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/issues-adding-a-spatial-reference-to-a-sql-view/m-p/1195683#M57727</link>
      <description>&lt;P&gt;You should be able to put your &lt;STRONG&gt;shape&lt;/STRONG&gt; field in your select statement.&lt;/P&gt;&lt;P&gt;The example below joins my property assessor records (many) to parcels (1). By adding the shape field from the Parcels polygon to the view definition it creates a polygon for each Assessor table record.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;CREATE VIEW  Test AS 
SELECT        
ASSESSORSBF.LOWPARCELID, 
ASSESSORSBF.PARCELID,                   
PARCELS.ZoningCode, 
PARCELS.Condominium, 
PARCELS.NumberUnits, 
ASSESSORSBF.Landlord_Number_of_Units, 
PARCELS.Shape
FROM            
ASSESSORSBF LEFT OUTER JOIN                   
PARCELS ON ASSESSORSBF.LOWPARCELID = PARCELS.LowParcelID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 23:17:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/issues-adding-a-spatial-reference-to-a-sql-view/m-p/1195683#M57727</guid>
      <dc:creator>RyanTucker</dc:creator>
      <dc:date>2022-07-25T23:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Issues adding a spatial reference to a sql view</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/issues-adding-a-spatial-reference-to-a-sql-view/m-p/1195917#M57750</link>
      <description>&lt;P&gt;Thanks Ryan, my shape field is already in my select statement, however that shape field doesn't have a coordinate system, that's what I would like to add.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 14:37:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/issues-adding-a-spatial-reference-to-a-sql-view/m-p/1195917#M57750</guid>
      <dc:creator>KevinDurkee</dc:creator>
      <dc:date>2022-07-26T14:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Issues adding a spatial reference to a sql view</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/issues-adding-a-spatial-reference-to-a-sql-view/m-p/1196126#M57799</link>
      <description>&lt;P&gt;What about using a SET statement after the view has been defined?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SET SHAPE = &lt;STRONG&gt;geometry::Polygon(26910)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 21:04:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/issues-adding-a-spatial-reference-to-a-sql-view/m-p/1196126#M57799</guid>
      <dc:creator>RyanTucker</dc:creator>
      <dc:date>2022-07-26T21:04:31Z</dc:date>
    </item>
  </channel>
</rss>

