<?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: Make Query Layer through joining two tables? in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462992#M26477</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I doubt cross-database queries are supported.&amp;nbsp; Cross-server queries with different authentication&lt;BR /&gt;domains are definitely not supported.&lt;BR /&gt;&lt;BR /&gt;The best way to accomplish this is to use Microsoft tools to generate a view that correctly executes&lt;BR /&gt; your desired query.&amp;nbsp; Accessing the view would then only incur the frightful performance cost for&lt;BR /&gt;such a join.&lt;BR /&gt;&lt;BR /&gt;- V&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi V,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for quick response. What do you mean that "use Microsoft tools to generate a view"? I create a view in SQL Server. But the view with geometry column couldn't be seen on ArcMap. Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-YL&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Nov 2013 18:35:57 GMT</pubDate>
    <dc:creator>YangLiu2</dc:creator>
    <dc:date>2013-11-12T18:35:57Z</dc:date>
    <item>
      <title>Make Query Layer through joining two tables?</title>
      <link>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462990#M26475</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;BR /&gt;&lt;SPAN&gt;I try to create a query layer through joining two tables(table1 and table2) from different databases (database1 and database2) located in different SQL servers(server A and server B). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These two servers are located in different computers. The server A is main one and the server B is linked server contacting with server A. Besides, I have two accounts, M-ADMIN and M. The M-ADMIN could login to the server A. In addition, the ArcMap is installed on third computer which M and M-ADMIN both can login to. On server A, M-ADMIN and M are set up on same permission. Also, on ArcCatalog, both account can create database connection of MyDatabase in server A. When I open ArcMap as M-ADMIN, I can create a query layer and add to mxd; however, when I open ArcMap as M, I cannot create same query layer. An error window pops up saying "Underlying DBMS error". Does anyone have idea why? Thanks! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The query statement is as following"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;SELECT&amp;nbsp; a.CountyID, a.FIPS, a.County, a.Status, dbo.table1.Shape 
FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [server B].database2.dbo.table2 AS a INNER JOIN 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbo.table1 ON a.FIPS = dbo.table1.FIPS&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-YL&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:34:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462990#M26475</guid>
      <dc:creator>YangLiu2</dc:creator>
      <dc:date>2021-12-11T20:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Make Query Layer through joining two tables?</title>
      <link>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462991#M26476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I doubt cross-database queries are supported.&amp;nbsp; Cross-server queries with different authentication&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;domains are definitely not supported.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The best way to accomplish this is to use Microsoft tools to generate a view that correctly executes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; your desired query.&amp;nbsp; Accessing the view would then only incur the frightful performance cost for&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;such a join.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2013 18:09:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462991#M26476</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-11-12T18:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Make Query Layer through joining two tables?</title>
      <link>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462992#M26477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I doubt cross-database queries are supported.&amp;nbsp; Cross-server queries with different authentication&lt;BR /&gt;domains are definitely not supported.&lt;BR /&gt;&lt;BR /&gt;The best way to accomplish this is to use Microsoft tools to generate a view that correctly executes&lt;BR /&gt; your desired query.&amp;nbsp; Accessing the view would then only incur the frightful performance cost for&lt;BR /&gt;such a join.&lt;BR /&gt;&lt;BR /&gt;- V&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi V,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for quick response. What do you mean that "use Microsoft tools to generate a view"? I create a view in SQL Server. But the view with geometry column couldn't be seen on ArcMap. Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-YL&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2013 18:35:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462992#M26477</guid>
      <dc:creator>YangLiu2</dc:creator>
      <dc:date>2013-11-12T18:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Make Query Layer through joining two tables?</title>
      <link>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462993#M26478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All views must be conformant to ArcGIS requirements:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Only one geometry column&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Only one geometry type (point/line/poly) in return rows (same type or nil or NULL for all rows)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) A registered rowid column must exist -&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; a) INTEGER type (32-bit)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; b) Defined NOT NULL&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; c) All values must be unique&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; d) Rowid values must be repeatable on re-query (no rownum)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When joining with a feature class, the rowid column of the business table can generally&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;be used (unless the join results in many rows with the same shape).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Nov 2013 18:52:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462993#M26478</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-11-12T18:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Make Query Layer through joining two tables?</title>
      <link>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462994#M26479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;All views must be conformant to ArcGIS requirements:&lt;BR /&gt;1) Only one geometry column&lt;BR /&gt;2) Only one geometry type (point/line/poly) in return rows (same type or nil or NULL for all rows)&lt;BR /&gt;3) A registered rowid column must exist -&lt;BR /&gt;&amp;nbsp; a) INTEGER type (32-bit)&lt;BR /&gt;&amp;nbsp; b) Defined NOT NULL&lt;BR /&gt;&amp;nbsp; c) All values must be unique&lt;BR /&gt;&amp;nbsp; d) Rowid values must be repeatable on re-query (no rownum)&lt;BR /&gt;&lt;BR /&gt;When joining with a feature class, the rowid column of the business table can generally&lt;BR /&gt;be used (unless the join results in many rows with the same shape).&lt;BR /&gt;&lt;BR /&gt;- V&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Good morning V,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I create a view in SSMS. This view meets all rules as you listed. The view is created through cross-instance query. Its columns include CountyID, FIPS, CountyName, Status, and Shape(which is geometry type and is polygon). The CountyID colume is unique column. When I open ArcMap and drap the view to ArcMap from geodatabase A, a 'Warning' window pops up saying "Could not add the specified data object to the map. Underlying DBMS error" again. I read a Thread posted 2 years ago. Some one says ArcGIS 10.0 and later version can support cross-instance query layer. Do you think the error occurs because of user permission setup? Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-YL&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 15:45:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462994#M26479</guid>
      <dc:creator>YangLiu2</dc:creator>
      <dc:date>2013-11-13T15:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Make Query Layer through joining two tables?</title>
      <link>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462995#M26480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You would need to capture the exact error (as reported by the database) before I could&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; render any judgement on the cause of the error (random guesses just waste time).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tech Support could help you find both the ArcGIS and database logs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 15:56:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/make-query-layer-through-joining-two-tables/m-p/462995#M26480</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-11-13T15:56:41Z</dc:date>
    </item>
  </channel>
</rss>

